Esempio n. 1
0
        public IActionResult AddProduct([FromBody] FullProduct product)
        {
            if (product != null)
            {
                product.productDetails.DatePublished = DateTime.Now;
                product.product.Code = _guidGenerator.GetGuid();
                _productMenager.AddProduct(product.product, product.productDetails);

                return(Ok("Product successfully added."));
            }
            else
            {
                return(BadRequest());
            }
        }
 public string GetGuidItalianMessage() => $"{guidGenerator.GetGuid()} - Italian";
Esempio n. 3
0
 public string GetGuid()
 {
     return(_guidGenerator.GetGuid());
 }
Esempio n. 4
0
 public string GetGuidEnglishMessage() => $"{guidGenerator.GetGuid()} - English";