예제 #1
0
        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());
        }
예제 #2
0
 public virtual async Task <WorkExperienceListDto> CreateAsync(Guid employeeId, WorkExperienceCreateDto input)
 {
     return(await _workExperienceAppService.CreateAsync(employeeId, input));
 }