[英]How can I concatenate two strings into one using LLBLGen Pro
As the error says, I think LLBLGen
have their own custom functions but official documentation doesn't help much.正如错误所说,我认为
LLBLGen
有自己的自定义函数,但官方文档并没有太大帮助。 Is there any way to concatenate these two strings and make into one while LINQ querying?有什么方法可以在 LINQ 查询时将这两个字符串连接起来并合二为一?
var viewModelCarrierDivisionQuery = from division in database.CarrierDivision
where division.CarrierId == carrierId
join carrier in database.Carrier
on division.CarrierId equals carrier.CarrierId
select new CarrierDetailViewModel.DivisionModel {
Id = division.CarrierDivisionId,
Name = string.Join(" / ", carrier.Name, division.DivisionName)
};
SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryConstructionException: 'Method call to 'Join' doesn't have a known mapped database function or other known handler.'
What I have used is just a simple solution with plus name +" / "+name
.我使用的只是一个简单的解决方案,加上
name +" / "+name
。 This works.这行得通。 Is there any better way out there?
有没有更好的出路?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.