常用方法
常用方法
常用方法
常用方法
//[Authorize(Policy = Policies.Seller)] public async Task <ActionResult> AddNewProduct([FromForm] ProductModel newProduct) { if (newProduct == null) { return(BadRequest()); } try { await _sellerService.AddProducts(newProduct); return(Ok($"Added product {newProduct.Title} to the database")); } catch (Exception ex) { throw ex; } }