protected virtual async Task Create(CreateOrEditEmployeeAbsenceDto input) { var employeeAbsence = ObjectMapper.Map <EmployeeAbsence>(input); await _employeeAbsenceRepository.InsertAsync(employeeAbsence); }
public async Task CreateOrEdit(CreateOrEditEmployeeAbsenceDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditEmployeeAbsenceDto input) { var employeeAbsence = await _employeeAbsenceRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, employeeAbsence); }