Exemple #1
0
        protected virtual async Task Create(CreateOrEditPbClassDto input)
        {
            var pbClass = ObjectMapper.Map <PbClass>(input);



            await _pbClassRepository.InsertAsync(pbClass);
        }
Exemple #2
0
 public async Task CreateOrEdit(CreateOrEditPbClassDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Exemple #3
0
        protected virtual async Task Update(CreateOrEditPbClassDto input)
        {
            var pbClass = await _pbClassRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, pbClass);
        }