Example #1
0
        protected virtual async Task Create(CreateOrEditUserShiftDto input)
        {
            var userShift = ObjectMapper.Map <UserShift>(input);



            await _userShiftRepository.InsertAsync(userShift);
        }
Example #2
0
 public async Task CreateOrEdit(CreateOrEditUserShiftDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Example #3
0
        protected virtual async Task Update(CreateOrEditUserShiftDto input)
        {
            var userShift = await _userShiftRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, userShift);
        }