Extensible Mesh Creation in MVC3 - Data Modeling

I am trying to create an extensible grid in MVC3. This is the next question. I basically have a complex sql query that I need to use to populate a set of fields in a grid in MVC3. Also, grid elements must be expandable, and when expanding, additional data should be displayed.

For example I have two sql queries

Query A
select * from large tables joined

Query B
select data from selected row in query A

Query A is my first query that I have to use to populate the grid. When expanding the grid, I have to show additional data by expanding the row from A using query B. I am creating a view model with all the fields that I need in the first row of the grid that I can pass to the view.

Questions:
    1.) How do I directly use sql to pass the data into the views instead of joining the models
    2.) How do I make the grid expandable to show additional data? 
    3.) How do I model my sql, do I create one query for both and then selectively show data?

Caution: MVC3 noob

+2
1

inline

:

1.) How do I directly use sql to pass the data into the views instead of joining the models

, , JSON, , , . : , , , . , , , ajax ( mvc)

2.) How do I make the grid expandable to show additional data? 

html :) Depend , / .

3.) How do I model my sql, do I create one query for both and then selectively 

1 . ajax, . , . b, 1-1, , , . , . , ? , ajax.

0

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


All Articles