entity framework - How to apply DDD with Breeze.WebApi.EFContextProvider? -
i use breeze.js on client , breeze.webapi on server. build ef poco entities methods , domain services. there background processes running on server use business domain fine.
the problem i'm not sure how use domain methods , services when saving client side changes on server efcontextprovider?
for example: if client adds new task , specifies new task should generate new actions each existing invoice (breeze saveoptions.tag), domain service addactionstoinvoices should invoked add necessary actions existing invoices. new task , new actions should saved during same transaction.
generally, able work domain need ensure aggregate roots fetched when calling domain methods , changes persisted @ end.
that's pretty open ended question. think understand general point @ least saves more store changed data in database. business processes in own right happen save data.
you try run these through single "savechanges" web api method. feels wrong. pretty savechanges
method becomes giant dispatcher helper methods.
have looked @ "named saves"? feature designed sounds scenario. think beats sending "tag" , trying dispatch appropriate server-side method based on tag value.
Comments
Post a Comment