M2M4RIA with ObjectContext

Nov 15, 2012 at 10:33 AM

Hello,

 

My DomainService is LinqToEntitiesDomainService, not DbDomainService. It is generated by wizard.

My context is ObjectContext, not DbContext. So I do not have OnModelCreating() to override and add .Ignore, as written in docs. What should I do? How to ignore?

Coordinator
Nov 19, 2012 at 8:40 PM

Hi,

In the docs I'm using DbDomainService because the crud operations for m2m make use of DbContext (also some helper function do). It will require some effort, but it is possible to make use of LinkToEntities and ObjectContext (i.e., the initial versions of m2m4ria were using LinkToEntities/ObjectContext). In step 4 in the Step-by-step instructions for using M2M with WCR RIA Services I describe the implementation of Insert and Delete operations for m2m link table entities. You need to change these methods to make them use ObjectContext rather than DbContext.

The OnModelCreating method has nothing to do with DbContext or DbDomainService, but with the FluentMetadata configuration. This is describe in step 3 of the Step-by-step instructions for using M2M with WCR RIA Services.

Kind regards,

Merijn