I want to perform a join operation in C# by the name of an property
var Query = from voucher in VoucherQuery
join da in detailedAccount
on voucher.vI.GetType().GetProperty("detailedAccountId") equals da.Id
select voucher;
Thanks
var detailedAccount = _context.DetailedAccounts.Where(c => DetailedAccountsSelected.Contains(c.Code) && c.IsActive).ToList();
var Query = from voucher in VoucherQuery
join da in detailedAccount
on voucher.vI.GetType().GetProperty("detailedAccountId") equals da.Id
select voucher;
New contributor
mahdi sharifi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2