3
votes

Is it possible to use separate ssdl, csdl and msl files for each Entity in EntityFramework?

That is, I want to modularize the mapping information.

Note: EdmGen.exe tool stores the ssdl, csdl and msl information in respective files for all entities.

Note: If anyone used NHibernate, he should be aware of the fact that, NHibernate uses separate mapping files for each entity. I want to do the same thing.

1
what is the benefit of doing separation?Krunal
The question is not 'Why', the question is 'Is it possible'? If the framework lets us to do that? In NHIbernate, the benefit is, we can concentrate on separate entities separately without cluttering up my problem.user366312

1 Answers

4
votes

Only if there are no relationships between the Entities.

As soon as there are relationships, you need to know about both entities, in the CSDL to create an association, which then bleeds into the MSL and from there into the SSDL.

So in theory yes.

In practice no.

Hope this helps

Alex