public async Task <ActionResult <SkillMaker> > PostSkillMaker(SkillMaker skillMaker) { _context.SkillMakers.Add(skillMaker); await _context.SaveChangesAsync(); return(CreatedAtAction("GetSkillMaker", new { id = skillMaker.Id }, skillMaker)); }
public async Task <IActionResult> PutSkillMaker(long id, SkillMaker skillMaker) { if (id != skillMaker.Id) { return(BadRequest()); } _context.Entry(skillMaker).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkillMakerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }