I\'m write this query:
var query2 = (from p in behzad.Compare_closed_numbers_in_CRM_and_Billing_system_detail_counters
where p.fileid == point
If count field is int try this:
int sum = behzad.Compare_closed_numbers_in_CRM_and_Billing_system_detail_counters
.Where(t=>t.fileid == point.id)
.Select(t => t.Count ?? 0).Sum();
If count field is nvarchar(max)
try this:
int sum = behzad.Compare_closed_numbers_in_CRM_and_Billing_system_detail_counters
.Where(t=>t.fileid == point.id)
.Select(t => Convert.ToInt32(t.Count)).Sum();