protected virtual async Task Create(CreateOrEditPbDownloadEbookDto input)
        {
            var pbDownloadEbook = ObjectMapper.Map <PbDownloadEbook>(input);



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

            ObjectMapper.Map(input, pbDownloadEbook);
        }