Breeze with a Unit Of Work/Repository pattern

前端 未结 2 956
花落未央
花落未央 2021-02-15 17:58

I was just wondering how I should go about implementing breeze\'s EFContextProvider in a separate data layer project. Also, since that project is a class librar

相关标签:
2条回答
  • 2021-02-15 18:26

    Here is a post from the Breeze folks about how to use a UoW and Repo on the server with Breeze http://www.breezejs.com/spa-template#server

    0 讨论(0)
  • 2021-02-15 18:34

    We've got a more sophisticated sample coming called "TempHire" that has a full blown UoW with Repos and separate model projects.

    Breeze.NET components (the .NET server-side helpers for a Breeze app ... if you're going with .NET) are all in a single .DLL They have no dependence on MVC at all ... zip. There is Web API stuff in there. Maybe that's what concerns you. Well ... remember that this is open source on GitHub. You are not constrained to the Breeze .DLL. Build your own out of the parts you want.

    In my view, the UoW is a short hop from Repository. If you understand what a bounded context is and can translate that to a DbContext implementation, I figure you shouldn't need much help making the transition yourself. There's no magic to it.

    For everyone I highly recommend Scott Allen's videos on Repository and UOW in the Pluralsight Design Patterns course ... perhaps the clearest, jargon-free exposition of these patterns I've ever seen.

    0 讨论(0)
提交回复
热议问题