public async Task <ActionResult <Parcelado> > PostParcelado(Parcelado parcelado) { _context.Parcelados.Add(parcelado); await _context.SaveChangesAsync(); return(CreatedAtAction("GetParcelado", new { id = parcelado.Id }, parcelado)); }
public async Task <IActionResult> PutParcelado(int id, Parcelado parcelado) { if (id != parcelado.Id) { return(BadRequest()); } _context.Entry(parcelado).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ParceladoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }