Last post Mar 08, 2017 02:46 PM by mgebhard
Mar 08, 2017 02:37 PM|mamoni.kol2017|LINK
when we use inline sql then we can write sql in such a way as a result it return multiple result set hitting db once time. for example
select * from department;select * from employee
here i use semicolon so when i execute the above sql with ado.net then database will be hit only one time and multiple result set will be return.
so when i am working with EF then how could i write linq query which will return multiple result set. i do not want to call store proc by EF rather i use EF linq query.
if possible please tell me. thanks
Mar 08, 2017 02:46 PM|mgebhard|LINK
This is a basic construct in Entity Framework where yo simply walk the relationships using dot syntax.
If you do not have relationships in your models (not using EF) then you can use a join or include.
Also you might find going through a few tutorials on the subject helpful. MSDN has a lot of detailed information.
You can also find a wealth of knowledge on this site by clicking the learn link above then selecting the technology you're working in.