Hi,
I have extended my entities to implement specific interfaces for its type. I am trying to perform the following query:
var results = from x in context.MyEntityTable
where x.AProperty == AValue
select x;
return results.Count() > 0 ? results.Cast<IApplicationEntity>().ToList() : null;
However, I keep getting the following error:
"LINQ to Entities only supports casting Entity Data Model primitive types"
Basically what I want to do is always convert the results from the raw entity type to a generic list of the interface it implements.
Is this possible?