Back to list
Views:   0
Replies:  0
Reply 1

Maintaining sepearate entities is the preferred choice over a entity will all data/ entity objects. There helps out by loading the specific set of data objects related to the respective repository. In your case, you can have Account Entities which deals with Account module only. Just incase a situation arrives where in you need to club both user and account entity objects, go for unit of work pattern (transaction over both repositories).

Simple words, Yes you can seperate the entities like Account Entities for Account repository and use the same data context. Load respective repositories based on the modules (Account/ User), use unit of work for persisting data on both the repositories.

Hope this helps.
Pavan Kumar Kota, Apr 25, 2012
Reply 2
It is recommended to use a single context but separate entities for each domain object.
Siva M, Mar 01, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas