public bool UpdateCart(CartEditModels cartmodel, out string message) { message = Constant.UpdateSuccess; var CartEntity = _cartRepository.GetById(cartmodel.ProductId); return(true); }
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); }
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); }
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 }); }