-3

I am looking for the equivalent LINQ query for the following Query.

SELECT SUM (Cost) FROM [Vulpith_Test2].[dbo].tbl_MilestonesForOngoingSeeker]
WHERE ([Post_Title_ID] = '3251'  
and [List_Title_ID]='1180')
and (PaymentStatus='1' or PaymentStatus='3');
Jamiec
  • 133,658
  • 13
  • 134
  • 193
Madhu
  • 15
  • 8
  • 1
    Show your .net code you started as well. Also entities, etc. This is just 1 table and should be very easy to do. – SS_DBA Jul 26 '17 at 12:57

1 Answers1

3
  int sumofCost =  dbContext.tbl_MilestonesForOngoingSeeker.Where(a => a.Post_Title_ID == "3251" && a.List_Title_ID == "1180" && (a.PaymentStatus == 1 || a.PaymentStatus == 3)).Sum(a => a.Cost);
summerGhost
  • 477
  • 4
  • 15