public async Task <ActionResult <UserConcept> > PostUserConcept(UserConcept userConcept) { _context.UserConcepts.Add(userConcept); await _context.SaveChangesAsync(); return(CreatedAtAction("GetUserConcept", new { id = userConcept.Id }, userConcept)); }
public async Task <IActionResult> PutUserConcept(Guid id, UserConcept userConcept) { if (id != userConcept.Id) { return(BadRequest()); } _context.Entry(userConcept).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserConceptExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }