c# - I want to join two tables and want column of both tables in result using linq -


i want join 2 tables , want column of both tables in result using linq

i have like

var k = (from t in uow.transactions.getallwithreferences()          join q in uow.transactiondetails.getall() on t.transactionid equals q.transactionid          select t) 

instead of t u wabt columns of both t , q

using lambda syntax, create anonymous result containing both items:

   var joinresult =  uow.transactions.getallwithreferences()           .join(uow.transactiondetails.getall(), transaction => transaction,                    details => details, (transaction, details) => new                                            {                                               transaction = transaction,                                              details = details                                           }); 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -