I've been working through a fantastic book (Pro ASP.net MVC 2 Framework, Steven Sanderson) and I am looking for clarification. In the book's e-commerce sample application uses linqTOsql and has just one table to hold p开发者_高级运维roduct entries. Obviously, real world applications have many many tables. I am wondering if there is a separate repository for each table object or if I should strive to have a single repository handle connections to all tables.
Thanks for any help.
Generally you would make 1 repository per aggregate root.
A bit more on aggregate roots and repositories
What's an Aggregate Root?
精彩评论