开发者

a controller with multiple repositories in ASP.Net MVC 3

开发者 https://www.devze.com 2023-02-02 12:17 出处:网络
I have a controller which controls a view which is a criteria search page. The view has a search criteria section at the top and a grid section at the bottom which will display the results from the se

I have a controller which controls a view which is a criteria search page. The view has a search criteria section at the top and a grid section at the bottom which will display the results from the search. I have two repositories in my controller, one for Common stuff like combobox values which is associated with Criteria section. The other repository is for the grid data. I create a viewmodel with both repositories and pass开发者_如何学Go it to my view (as my model) which makes my Model really huge. Is there any better way of doing this?


It is better to use Unit of Work and Repository

0

精彩评论

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