Example #1
0
 public async Task CreateOrEdit(CreateOrEditPermitDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Example #2
0
        protected virtual async Task Update(CreateOrEditPermitDto input)
        {
            var permit = await _permitRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, permit);
        }
Example #3
0
 protected virtual async Task Create(CreateOrEditPermitDto input)
 {
     var permit = ObjectMapper.Map <Permit>(input);
     await _permitRepository.InsertAsync(permit);
 }