public async Task <Educator> UpdateEducator(UpdateEducatorDto input) { var educator = await _educatorRepository.GetByIdAsync(input.Id); educator.Name = input.Name; educator.Surname = input.Surname; educator.Profession = input.Profession; educator.Resume = input.Resume; await _educatorRepository.UpdateAsync(educator); return(educator); }
public async Task <IActionResult> UpdateEducator(UpdateEducatorDto input) { try { var educator = await _educatorAppService.UpdateEducator(input); return(Ok(educator)); } catch (Exception e) { Console.WriteLine(e); throw; } }