public async Task <IActionResult> Create(LaborExperiences LaborExperiences) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await _laborExperiencescRepository.CreateAsync(LaborExperiences); return(Ok(await _laborExperiencescRepository.SaveAsync())); }
public async Task <IActionResult> Update([Required] int id, LaborExperiences laborExperiences) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != laborExperiences.Id) { return(NotFound()); } _laborExperiencescRepository.Update(laborExperiences); return(Ok(await _laborExperiencescRepository.SaveAsync())); }