Advertisement
Guest User

Untitled

a guest
Aug 27th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. var CoreData = new
  2. {
  3. Shoots =
  4. (from item in coresdb.Productions
  5. where item.Date >= StartShift && item.Date <= EndDate
  6. select item).Sum(x => Convert.ToInt32(x.ShootCount)
  7. )
  8. };
  9.  
  10. var CoreData = coresdb.Productions
  11. .Where(item => item.Date >= StartShift && item.Date <= EndDate)
  12. .ToList() // get the data into memory first.
  13. .Sum(x => Convert.ToInt32(x.ShootCount));
  14.  
  15. Shoots =
  16. (from item in coresdb.Productions
  17. where item.Date >= StartShift && item.Date <= EndDate select item)
  18.  
  19. .Sum(x => SqlFunctions.IsNumeric(x.ShootCount))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement