public async Task <IActionResult> Post([FromBody] DtoResumeSkill dto) { var entity = Mapper.Map <ResumeSkill>(dto); _context.ResumeSkills.Add(entity); await _context .SaveChangesAsync() .ConfigureAwait(false); return(Ok(entity.Id)); }
public async Task <IActionResult> Update([FromBody] DtoResumeSkill dto, [FromRoute] long id) { var template = Mapper.Map <ResumeSkill>(dto); template.Id = id; await _context.ResumeSkills .Where(x => x.Id == id) .UpdateFromQueryAsync(_ => template) .ConfigureAwait(false); return(Ok(id)); }