Skip to main content
Code Review

Return to Question

Hindsight edit
Source Link

EDIT (4 years on): Looking back, my implementation was horrendous; mainly because of the InitRepositories() method that was called by the UoW constructor. This meant that for every instantiation of the UoW, it would instantiate each and every repository, regardless of whether they may be used or not. Aside from this the implementation isn't too bad, though it does work in reverse order to most others. If you want to hold the repositories explicitly within the UoW, you should implement them as (forgive my terminology) lazily self-instantiating properties, like here . Nowadays my preference is to use URF.NET and customise it as required.

EDIT (4 years on): Looking back, my implementation was horrendous; mainly because of the InitRepositories() method that was called by the UoW constructor. This meant that for every instantiation of the UoW, it would instantiate each and every repository, regardless of whether they may be used or not. Aside from this the implementation isn't too bad, though it does work in reverse order to most others. If you want to hold the repositories explicitly within the UoW, you should implement them as (forgive my terminology) lazily self-instantiating properties, like here . Nowadays my preference is to use URF.NET and customise it as required.

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link
Removed "thanks"
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Many thanks in advance for any feedback you can give me.

Many thanks in advance for any feedback you can give me.

Source Link
Loading
lang-cs

AltStyle によって変換されたページ (->オリジナル) /