protected virtual async Task Create(CreateOrEditPbTypeEbookDto input)
        {
            var pbTypeEbook = ObjectMapper.Map <PbTypeEbook>(input);



            await _pbTypeEbookRepository.InsertAsync(pbTypeEbook);
        }
 public async Task CreateOrEdit(CreateOrEditPbTypeEbookDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
        protected virtual async Task Update(CreateOrEditPbTypeEbookDto input)
        {
            var pbTypeEbook = await _pbTypeEbookRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, pbTypeEbook);
        }