public IActionResult Put([FromBody] ProductSizeAndPrice model) { try { uow.ProductSizeAndPriceRepo.Update(model); uow.SaveChanges(); return(Created("/api/ProductSizeAndPrice", model)); } catch { return(StatusCode(500)); } }
public IActionResult Post([FromBody] ProductSizeAndPrice model) { try { uow.ProductSizeAndPriceRepo.Add(model); uow.SaveChanges(); return(Created("/api/ProductSizeAndPrice", model)); } catch (Exception ex) { return(StatusCode(500, ex.Message)); } }