Beispiel #1
0
        protected virtual async Task Create(CreateOrEditTypesOfPermitDto input)
        {
            var typesOfPermit = ObjectMapper.Map <TypesOfPermit>(input);



            await _typesOfPermitRepository.InsertAsync(typesOfPermit);
        }
Beispiel #2
0
 public async Task CreateOrEdit(CreateOrEditTypesOfPermitDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Beispiel #3
0
        protected virtual async Task Update(CreateOrEditTypesOfPermitDto input)
        {
            var typesOfPermit = await _typesOfPermitRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, typesOfPermit);
        }