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
Post a Comment