var results = from u in dc.Tran1
where u.UserId == userIdselectnew{ID = u.UserId,TranId = u.TransId,};i have a query like above in my controllerhow to get values from above query like id and tranid into some other variables
var results = from u in dc.Tran1
where u.UserId == userIdselectnew{ID = u.UserId,TranId = u.TransId,};i have a query like above in my controllerhow to get values from above query like id and tranid into some other variables
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 21, 2014, 7:11 AM
Although I don't like them much, as an alternative to a named type, you can also use a Tuple. However, you'd then need to access the properties using Item1 and Item2 rather than their actual names.
Sasi ReddyPosted Aug 21, 2014, 7:26 AM