开发者

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

开发者 https://www.devze.com 2023-01-14 05:45 出处:网络
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

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

精彩评论

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