int? count = (from cartItems in storeDB.Carts where cartItems.CartId == ShoppingCartId select (int?)cartItems.Count).Sum();
return count ?? 0;
int?
nullable integer
??
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)