Exemplo n.º 1
0
 public async Task CreateOrEdit(CreateOrEditCruisePhotosDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Exemplo n.º 2
0
        private async Task Create(CreateOrEditCruisePhotosDto input)
        {
            var cruisePhotos = ObjectMapper.Map <CruisePhoto>(input);


            if (AbpSession.TenantId != null)
            {
                cruisePhotos.TenantId = (int?)AbpSession.TenantId;
            }


            await _cruisePhotosRepository.InsertAsync(cruisePhotos);
        }
Exemplo n.º 3
0
        private async Task Update(CreateOrEditCruisePhotosDto input)
        {
            var cruisePhotos = await _cruisePhotosRepository.FirstOrDefaultAsync((long)input.Id);

            ObjectMapper.Map(input, cruisePhotos);
        }