public async Task <IActionResult> PutClasificacionIngrediente(Guid id, ClasificacionIngrediente clasificacionIngrediente) { if (id != clasificacionIngrediente.Id) { return(BadRequest()); } _context.Entry(clasificacionIngrediente).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClasificacionIngredienteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <ClasificacionIngrediente> > PostClasificacionIngrediente(ClasificacionIngrediente clasificacionIngrediente) { _context.ClasificacionIngrediente.Add(clasificacionIngrediente); await _context.SaveChangesAsync(); return(CreatedAtAction("GetClasificacionIngrediente", new { id = clasificacionIngrediente.Id }, clasificacionIngrediente)); }