ASP.NET - loading grid data with a large OO structure

Let's say I have an object that is quite complex. Since it is so complex, it takes a little to load from the database. Now let me say that my users want the grid to display all of these objects, and I know if I will provide it, performance will be undesirable. I'm trying to move my finger on the best way to handle this. So far I have two ideas:

Implementing lazy-loading: I really don't need the whole object to display the grid. I’m not sure that I want to go this route this way, because the whole loaded object will be needed everywhere, and I don’t want to drastically change my architecture for meshes.

Bring back the record set specifically designed for my grid: so I lean. Basically, I would return a DataSet or just a flat object. My stored procedure can execute data relationships to return a set of records as desired.

Are there any other approaches that I can take a look at? I did not make real grids before and wanted to make sure that I did it right the first time. Can anyone come up with any flaws in my second idea?

+3
source share
2 answers

, , . , , , . , ; , , ?

+3

, , .

! , . , , . . , , DB (, .. ).

proc, , 10 20 , . , , rownumber start end, proc.

+1

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


All Articles