public async Task <ActionResult <ingreso_> > Postingreso_(ingreso_ ingreso_) { _context.Ingresos_.Add(ingreso_); await _context.SaveChangesAsync(); return(CreatedAtAction("getingreso_", new { id = ingreso_.idIngreso_ }, ingreso_)); }
public async Task <IActionResult> putingreso_(int id, ingreso_ ingreso_) { if (id != ingreso_.idIngreso_) { return(BadRequest()); } //MI ENTIDAD YA TIENE LAS PROPIEDADES QUE VOY A AGUARDAR EN MI BD _context.Entry(ingreso_).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Ingreso_Exists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }