public async Task <ActionResult <MCAttributes> > PostMCAttributes(MCAttributes mCAttributes) { _context.MCAttributes.Add(mCAttributes); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMCAttributes", new { id = mCAttributes.Id }, mCAttributes)); }
public async Task <IActionResult> PutMCAttributes(int id, MCAttributes mCAttributes) { if (id != mCAttributes.Id) { return(BadRequest()); } _context.Entry(mCAttributes).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MCAttributesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }