public async Task <IActionResult> PutEattributes(long id, Eattributes eattributes) { if (id != eattributes.EattributesId) { return(BadRequest()); } _context.Entry(eattributes).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EattributesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Eattributes> > PostEattributes(Eattributes eattributes) { _context.Eattributes.Add(eattributes); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (EattributesExists(eattributes.EattributesId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetEattributes", new { id = eattributes.EattributesId }, eattributes)); }