Patterns and practice. Service level?

Do I have to do automation at my service level or on my controller?

I like the idea of ​​Repository - IQueryable source data with full domain (type) objects. Service level - paged, ordered, filtered, automatically loaded model Controller - click on the image using the correct model

But, seeing good stuff with ActionFilters and attributes, I wonder if there would be a better approach

Repository - IQueryable source data with full domain (type) objects. Service level - filtered, uploaded data. Domain objects. Controller - automatic determination of service level data and clicking on a view.

Any thoughts on this would be greatly appreciated.

+3
source share
1 answer

You may have seen this article: http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/06/29/how-we-do-mvc-view-models.aspx

I found this interesting, and I plan to use it in my next project. It looks like you can still keep your controller thin and beautify your actions with automapper.

It seems like this is what you plan to do, and it sounds like a good approach.

+3
source

Source: https://habr.com/ru/post/1767500/


All Articles