I've created a oData V4 endpoint with Web API 2.2 and Entity Framework. The model that is expose looks like the following model:
public class Items {
public int Id { get; set; }
public string Name { get; set; }
public DateTime CreatedOn { get; set; }
}
When I go to the URL: /odata/Items it works like a charm. But when I go to the URL: /odata/Items?$orderby=CreatedOn I get the following error:
'The specified type member 'Kind' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.'
System.DateTime
which describes whether it is Local or UTC. – Aron