Custom OData operation / customize EF model to hide join table in many-to-many relationship
Posted
by AC
on Stack Overflow
See other posts from Stack Overflow
or by AC
Published on 2010-06-16T14:59:36Z
Indexed on
2010/06/16
15:02 UTC
Read the original article
Hit count: 239
I've got a data model that has two tables with a join table for a many to many relationship & creating an OData service to expose the data for CRUD ops in a Silverlight app. What I'd like to do is abstract the join table from the service. I'm not sure if the best way to do this would be in the model (using EF in .NET3.5SP1) or if I should do it with a custom service operation.
If I do it in the EF model (not sure how I'd do this), then the OOTB WCF Data Service stuff would make it easy to say [..]/Courses(1)/Modules ... otherwise I'd have to create a custom operation to do this.
Is it possible to do this in the EF model and if so, how does that work?
© Stack Overflow or respective owner