Answers for "select specific columns from datatable in c# using lambda"

0

select specific columns from datatable in c# using lambda

Object AccountObject = _dbContext.Accounts
                                   .Join(_dbContext.Users, acc => acc.AccountId, usr => usr.AccountId, (acc, usr) => new { acc, usr })
                                   .Where(x => x.usr.EmailAddress == key1)
                                   .Where(x => x.usr.Hash == key2)
                                   .Select(x => new { AccountId = x.acc.AccountId, Name = x.acc.Name })
                                   .SingleOrDefault();
Posted by: Guest on April-28-2021

Code answers related to "select specific columns from datatable in c# using lambda"

Browse Popular Code Answers by Language