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