I am getting the following exception when I tried to get single entity with method named 'GetSingle(Id)' .My entity class has integer identifier but it is not 'Id', it is SiteId.
The specified type member 'Id' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
I think Linq is trying to use Id field to generate sql query to get data but my primary identifier field is 'SiteId'
Is there any way to specify entity identifier?
public partial class se_Sites : IEntity
{
public int Id { get { return SiteId; } set { SiteId = value; } }
public int SiteId { get; set; }
public string Name { get; set; }
public string ShortName { get; set; }