예제 #1
0
        protected virtual async Task Create(CreateOrEditMobileWebPageDto input)
        {
            var mobileWebPage = ObjectMapper.Map <MobileWebPage>(input);



            await _mobileWebPageRepository.InsertAsync(mobileWebPage);
        }
예제 #2
0
 public async Task CreateOrEdit(CreateOrEditMobileWebPageDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
예제 #3
0
        protected virtual async Task Update(CreateOrEditMobileWebPageDto input)
        {
            var mobileWebPage = await _mobileWebPageRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, mobileWebPage);
        }