User-1237044210 posted
Hi liuc,
I really like practice project. Now you can show me your methodology in design your application. Domain Driven Design or not?
If you chose DDD, you can reference to my project at
http://nma.codeplex.com/ for using UoW and Repository. I only noted you UoW is underline the Repository, if you apply UoW on your Repository, you must get UoW on each request (certainly UoW is a singleton).
Or you can implement it as: separated your UoW with Repository. For examples, if you use Fluent NHibernate, UoW is get the Session into it and when the Repository want to commit a action, it must get the Session from UoW, and request the UoW commit for its
the action.
Come back to your scenario, you must define your root aggregate, and one root aggregate is created one Repository. If you thought all your application only have one root, it only have distinct repository. Or else maybe your application have more Repositories.
If it have any point don't make sense for you, please tell me!
Regards,
ThangChung