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