public async Task <ActionResult <BoletoTipo> > PostBoletosTipos(BoletoTipo boletosTipos) { _context.BoletosTipos.Add(boletosTipos); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBoletosTipos", new { id = boletosTipos.Id }, boletosTipos)); }
public async Task <IActionResult> PutBoletosTipos(int id, BoletoTipo boletosTipos) { if (id != boletosTipos.Id) { return(BadRequest()); } _context.Entry(boletosTipos).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BoletosTiposExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }