public partial class User : IUser
{
public long ID {get; set;}
public BaseUser BaseUser
{
get
{
var context = new Factory().Create<ContextDB>();
return context.Users.Find(this.ID);
}
}
}
and
var result = _Context.Employees.Where(t => t.User.BaseUser.UserName.ToLower().Trim().Contains(searchKey));
Here I am getting an exception:
The specified type member 'BaseUser' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
Any solution to this?