Esempio n. 1
0
        public static Product ProductFromDto(ProductDto dto)
        {
            if (dto == null) return null;

            return new Product()
            {
                Name = dto.Name,
                Description = dto.Description,
                Inventory = dto.Inventory,
                ProductID = dto.ProductID,
                PurchasePrice = dto.PurchasePrice,
                SalePrice = dto.SalePrice,
                UnitQuantity = dto.UnitQuantity
            };
        }
Esempio n. 2
0
 public int StoreProduct(ProductDto product)
 {
     String response = requester.Put<ProductDto>(new PutProductRequest(urlBase, product));
     return Convert.ToInt32(response);
 }