I am not a pro on Linq but trying to understand. How to write this code (written in VB) in C#
Dim x = From p in db.YourClass _
Where p.fl1 = cn1 And p.f12 = cn2
Select _
sum1 = x.Sum(Function(y) y.fl1), _
sum2 = x.Sum(Function(y) y.fl2), _
sum3 = x.Sum(Function(y) y.fl3)
what i am trying to achieve is this,
select sum(fl1),sum(fl2),sum(fl3)
where fl1 =cn1 and fl2=cn2
Edit: In one query I think this can work fast: