Search code examples
c#entity-frameworkwcf-ria-services

migrating to OpenRIAService


As I upgraded my EntityFramework from EF 5 with Legacy ObjectContext to EF 6 with T4, I'm also forced to the OpenRIAService. So far I followed the Blog post.

Unfortunately, I'm having a problem in all of my DomainServices. Here is the Error Message in German

Der Typ 'DatabaseModel.MyEntities' kann nicht als Typparameter 'TContext' im generischen Typ oder in der generischen Methode 'OpenRiaServices.DomainServices.EntityFramework.LinqToEntitiesDomainService' verwendet werden. Es ist keine implizite Verweiskonvertierung von 'DatabaseModel.MyEntities' in 'System.Data.Entity.Core.Objects.ObjectContext' vorhanden.

Here is my translation to english

The type 'DatabaseModel.MyEntities' can not be used as type parameter 'TContext' in the generic type or method 'OpenRiaServices.DomainServices.EntityFramework.LinqToEntitiesDomainService'. There exist no implicit conversion from 'DatabaseModel.MyEntities' in 'System.Data.Entity.Core.Objects.ObjectContext'.

Seems like it wanted to have ObjectContext, maybe you have an idea?


Solution

  • Had derive from DbDomainService instead of LinqToEntitiesDomainService in the class definition.