Example #1
0
        protected virtual async Task Create(CreateOrEditLabelDto input)
        {
            var label = ObjectMapper.Map <Label>(input);



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

            ObjectMapper.Map(input, label);
        }