Beispiel #1
0
        protected virtual async Task Create(CreateOrEditTemplateDto input)
        {
            var template = ObjectMapper.Map <Template>(input);



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

            ObjectMapper.Map(input, template);
        }