public async Task <IActionResult> PutProject(long id, Project project) { if (id != project.Id) { return(BadRequest()); } _context.Entry(project).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProjectExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTechSkill(long id, TechSkill techSkill) { if (id != techSkill.Id) { return(BadRequest()); } _context.Entry(techSkill).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TechSkillExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSkillCategory(long id, SkillCategory skillCategory) { if (id != skillCategory.Id) { return(BadRequest()); } _context.Entry(skillCategory).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkillCategoryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEducationItem(long id, EducationItem educationItem) { if (id != educationItem.Id) { return(BadRequest()); } _context.Entry(educationItem).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EducationItemExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }