public async Task <IActionResult> PutPrecioVentaArticulo(long id, PrecioVentaArticulo precioVentaArticulo) { if (id != precioVentaArticulo.Id) { return(BadRequest()); } _context.Entry(precioVentaArticulo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PrecioVentaArticuloExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <PrecioVentaArticulo> > PostPrecioVentaArticulo(PrecioVentaArticulo precioVentaArticulo) { _context.PreciosVentaArticulos.Add(precioVentaArticulo); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPrecioVentaArticulo", new { id = precioVentaArticulo.Id }, precioVentaArticulo)); }