protected virtual async Task Create(CreateOrEditUserTimeSheetApproveDto input) { var userTimeSheetApprove = ObjectMapper.Map <UserTimeSheetApprove>(input); await _userTimeSheetApproveRepository.InsertAsync(userTimeSheetApprove); }
public async Task CreateOrEdit(CreateOrEditUserTimeSheetApproveDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditUserTimeSheetApproveDto input) { var userTimeSheetApprove = await _userTimeSheetApproveRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, userTimeSheetApprove); }