entity-framework-6wcf-ria-services

How to Use OpenRiaServices with Entity Framework 6.4.4


I am trying to use Entity Framework 6.4.4 inside a .net6 project. I was able to create the .edmx file and was able to generate the entities. All is working well. Now I want to use Open Ria Services to create LinqToEntitiesDomainService. But the problem is, the LinqToEntitiesDomainService expects ObjectContext as TContext but I am working with EF 6 and I have DB context.

Can anyone tell me what am I doing wrong? Their nuget package description claims that it works with EF6.4.4 but so far I can't make it work with EF6.4.4 due to DBContext vs ObjectContext issue.


Solution

  • Upon further investigation into the code, I realized that I don't have to use LinqToEntitiesDomainService but instead DbDomainService since the former works with ObjectContext (EF < 4) and the later works with DbContext (EF > 4).

    Either this critical information was missing from the Help docs I went through or I missed it. Nonetheless, my issue is resolved now.