public CustomerModel SaveEditedOrder(string Id, CustomerModel model)
        {
            var tempCustomerModel = new DataContract.Inventory
            {
                Description = model.Description,
                InStock     = model.InStock,
                Id          = model.Id,
                IsOrdered   = model.Quantity > 0 ? true : false,
                Quantity    = model.Quantity,
                Name        = model.Name,
                Price       = model.Price,
            };

            var order = _inventoryRepository.UpdateById(Id, tempCustomerModel);

            return(model);
        }
        public CustomerModel AddNewProduct(CustomerModel model)
        {
            var tempCustomerModel = new DataContract.Inventory
            {
                Description = model.Description,
                InStock     = model.InStock,
                Id          = model.Id,
                IsOrdered   = model.Quantity > 0 ? true : false,
                Quantity    = model.Quantity,
                Name        = model.Name,
                Price       = model.Price,
            };

            var newProduct = _inventoryRepository.AddEntity(tempCustomerModel);

            return(model);
        }
 public void AddProducts(DataContract.Inventory model)
 {
     _inventoryRepository.AddEntity(model);
 }