Exemple #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";
Exemple #3
0
 public string GetGuid()
 {
     return(_guidGenerator.GetGuid());
 }
Exemple #4
0
 public string GetGuidEnglishMessage() => $"{guidGenerator.GetGuid()} - English";