Example #1
0
 public Cart CreateCart()
 {
     using(var context = new ECommerceDbDataContext(_conStr))
     {
         Cart cart = new Cart();
         cart.DateCreated = DateTime.Now;
         context.Carts.InsertOnSubmit(cart);
         context.SubmitChanges();
         return cart;
     }
 }
 partial void DeleteCart(Cart instance);
 partial void UpdateCart(Cart instance);
 partial void InsertCart(Cart instance);