Select from multiple tables in one call

前端 未结 7 1140
隐瞒了意图╮
隐瞒了意图╮ 2021-02-13 13:01

In my code I have a page that includes information from 3 different tables. To show this information I make 3 SQL select calls and unite them in one list to pass as Model to my

7条回答
  •  一生所求
    2021-02-13 13:46

    Assuming you are using EntityFramwork you can use EF Stored procedure that returns multiple result sets. Then map the result tables to your class object. Take a look here or google it. It will take one round to the DB.

提交回复
热议问题