.net - linq make call from each iternation -



.net - linq make call from each iternation -

i have folloiwng linq query

var results = mainlist.select(item => new { spresult: sp_getsys(item.psid, item.nominprsn), psid: item.psid, nominprsn: item.nominprsn });

mainlist has 2 rows. 1 psid , other nominprsn each iteration, need phone call stored procedure called sp_getsys. result of spresult list 8 rows. need 2nd row , farther more field called psdate. how can modify spresult: sp_getsys(item.psid, item.nominprsn) above this?

i think job, seems may improve thought break out foreach loop gain clarity.

var results = item in mainlist select new { spresult = sp_getsys(item.psid, item.nominprsn).skip(1).firstordefault().psdate, psid = item.psid, nominprsn = item.nominprsn };

.net linq linq-to-sql

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -