Exemple #1
0
        public bool UpdateCart(CartEditModels cartmodel, out string message)
        {
            message = Constant.UpdateSuccess;
            var CartEntity = _cartRepository.GetById(cartmodel.ProductId);

            return(true);
        }
Exemple #2
0
 public static Cart MapToEntity(this CartEditModels Model, Cart entity)
 {
     entity.ProductId   = Model.ProductId;
     entity.Quantity    = Model.Quantity;
     entity.UnitPrice   = Model.UnitPrice;
     entity.ProductName = Model.ProductName;
     entity.CookieName  = Model.CookieName;
     entity.CustomerId  = Model.CustomerId;
     return(entity);
 }
Exemple #3
0
 public static CartEditModels MapToModel(this Cart entity, CartEditModels model)
 {
     model.ProductId   = entity.ProductId;
     model.Quantity    = entity.Quantity;
     model.UnitPrice   = entity.UnitPrice;
     model.ProductName = entity.ProductName;
     model.CookieName  = entity.CookieName;
     model.CustomerId  = entity.CustomerId;
     return(model);
 }
Exemple #4
0
 public static Cart MapToEditEntity(this CartEditModels Model)
 {
     return(new Cart
     {
         ProductId = Model.ProductId,
         Quantity = Model.Quantity,
         UnitPrice = Model.UnitPrice,
         ProductName = Model.ProductName,
         CookieName = Model.CookieName,
         CustomerId = Model.CustomerId
     });
 }