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