public IActionResult PutProductCategorium(Int64 key, [FromBody] Models.Agriculturebd.ProductCategorium newItem) { if (newItem == null || newItem.Id != key) { return(BadRequest()); } this.OnProductCategoriumUpdated(newItem); this.context.ProductCategoria.Update(newItem); this.context.SaveChanges(); return(new NoContentResult()); }
public IActionResult Post([FromBody] Models.Agriculturebd.ProductCategorium item) { if (item == null) { return(BadRequest()); } this.OnProductCategoriumCreated(item); this.context.ProductCategoria.Add(item); this.context.SaveChanges(); return(Created($"odata/Agriculturebd/ProductCategoria/{item.Id}", item)); }
partial void OnProductCategoriumUpdated(Models.Agriculturebd.ProductCategorium item);