代码的恒定值无法创建类型“System.Object的”
using (TimeTableEntities obj = new TimeTableEntities())
{
var dataM=obj.LoginAccesses.Where(i =>(i.Salutation + ' ' + i.Fname + ' ' + i.Lname) == fname).ToList();
foreach(var countTemp in dataM)
{
//mycode
}
}
异常
"Unable to create a constant value of type 'System.Object'. Only primitive types or enumeration types are supported in this context."
,当我试图不where子句它的工作对我罚款,但是当我加入其中,它显示上述异常
谢谢你提前实体
尝试使用[DatabaseGenerated(DatabaseGeneratedOption.Computed),并创建新的属性Concat的你的数据在使用,其中cluase。 –
如何使用?任何前。 – Pravin