Entity Framework 4 Hiding Underlying Resolver Tables when model is generated from database

Posted by grrrrrrrrrrrrr on Stack Overflow See other posts from Stack Overflow or by grrrrrrrrrrrrr
Published on 2010-05-19T20:12:08Z Indexed on 2010/05/19 20:20 UTC
Read the original article Hit count: 172

When creating an entity framework model from scratch it is possible to specify a Many to Many relationship in the model.

e.g Entity1 * ----- * Entity2

When a database is then generated from this, a resolver table is then created automatically between the two entities, this is hidden in the code model, allowing direct access to each of the entities via properties.

e.g. Entity1 ----* ResolverEntity *----- Entity2

My question is, when a model is generated from an existing database, which contains resolver tables, is it possible to create the same effect so the resolver tables do not appear in the generated object model?

When I have attempted this, the entity framework appears to create entities in the model for the resolver tables with no obvious way of hiding them in the object model.

Thanks.

© Stack Overflow or respective owner

Related posts about entity-framework-4

Related posts about table-relationships