Exemplo n.º 1
0
 public CartHistoryModel AddToCartHistory(CartHistoryModel model)
 {
     using (dbContext)
     {
         if (model != null)
         {
             CartHistory history = new CartHistory
             {
                 CartHistoryId = model.CartHistoryId,
                 ProductId     = model.ProductId,
                 UserCartId    = model.UserCartId,
                 //Product = model.Product,
                 Quantity     = model.Quantity,
                 Price        = model.Price,
                 Status       = model.Status,
                 DateRecorded = model.DateRecorded
             };
             _ = dbContext.CartHistories.Add(history);
             _ = dbContext.SaveChanges();
             return(model);
         }
     }
     return(model);
 }
Exemplo n.º 2
0
 public CartHistoryModel UpdateCartHistory(int modelCartHistoryId, CartHistoryModel model)
 {
     throw new NotImplementedException();
 }