public async Task <IActionResult> PutUserData(int id, UserData userData) { if (id != userData.UserId) { return(BadRequest()); } _context.Entry(userData).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserDataExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProjects(int id, Projects projects) { if (id != projects.ProjectsId) { return(BadRequest()); } _context.Entry(projects).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProjectsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> editResumeData(int id, ResumeData resumeData) { _context.Entry(resumeData).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ResumeDataExists(id)) { return(NotFound()); } else { throw; } } //var updatedResume = await _context.ResumeData // .Where(r => r.ResumeId == id) // .Include(s => s.Links) // .Include(w => w.WorkData) // .Include(w => w.Education) // .Include(w => w.Language) // .Include(w => w.Projects) // .Include(w => w.Recommends) // .Include(w => w.Skills) // .FirstOrDefaultAsync(); return(NoContent()); }
public async Task <IActionResult> PutCompany(int id, Company company) { if (id != company.Id) { return(BadRequest()); } _context.Entry(company).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompanyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSkillType(int id, SkillType skillType) { if (id != skillType.Id) { return(BadRequest()); } _context.Entry(skillType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkillTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }