public async Task <IActionResult> OnPostAsync() { var dto = ObjectMapper.Map <WorkExperienceCreateViewModel, WorkExperienceCreateDto>(WorkExperience); string[] times = WorkExperience.WorkTime .Split(new char[] { '~' }, StringSplitOptions.RemoveEmptyEntries); dto.StartTime = Convert.ToDateTime(times[0] + " 00:00:00"); dto.EndTime = Convert.ToDateTime(times[1] + " 00:00:00"); await _workExperienceAppService.CreateAsync(WorkExperience.EmployeeId, dto); return(NoContent()); }
public virtual async Task <WorkExperienceListDto> CreateAsync(Guid employeeId, WorkExperienceCreateDto input) { return(await _workExperienceAppService.CreateAsync(employeeId, input)); }