This is the output of joining 2 tables by inner join.
I want linq query of joing two table as inner join and group by name from one table and sum of total from another table column as taken snapshot as above.pls help
This is the output of joining 2 tables by inner join.
I want linq query of joing two table as inner join and group by name from one table and sum of total from another table column as taken snapshot as above.pls help
Check this post.
var result = (from a in ctx.TableA
join b in ctx.TableB on a.Id equals b.Id
group a by a.Name into g
select new
{
Name = g.Key,
Sum = g.Sum(i => i.Total)
}).ToList();