domain driven design - DDD and Entity Framework - manually building associations -


if manually build our associations have expose foreign keys in our domain model?

for example, if retrieve products , categories, way can manually build product.categories property if expose productcategory mapping in model?

i'd rather not if there alternative (note eager loading via ef not option have 2 many associations load).

you add partial class "product" project , extend "product" entity ienumerable<category> property "categories" (or method returns ienumerable<category>).

this way implement retrieval of "categories" yourself.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -