开发者

Does an MVC 2 site with linqTOsql need repositories for each table object, or is there supposed to be one repository per site?

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜