Beispiel #1
0
        protected virtual async Task Create(CreateOrEditWarningTypeDto input)
        {
            var warningType = ObjectMapper.Map <WarningType>(input);



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

            ObjectMapper.Map(input, warningType);
        }