使用 select d.FullName 时出现错误“LINQ to Entities 不支持指定类型成员 FullName”,是不是因为它不是表的一部分?
我该如何解决?
谢谢
用户类public partial class tblUser
{
public tblUser()
{
this.Equipment = new HashSet<tblEquipment>();
}
public int ID { get; set; }
public string Forename { get; set; }
public string Surname { get; set; }
public string FullName { get { return Forename + " " + Surname; } }
查询错误
string[] arrUsers = (from d in db.tblUsers select d.FullName).ToArray();