private async Task Update(CreateOrEditCruiseAmenitiesStorageDto input) { var cruiseAmenitiesStorage = await _cruiseAmenitiesStorageRepository.FirstOrDefaultAsync((long)input.Id); ObjectMapper.Map(input, cruiseAmenitiesStorage); // ObjectMapper.Map<CreateOrEditCruiseAmenitiesStorageDto>(input); }
public async Task CreateOrEdit(CreateOrEditCruiseAmenitiesStorageDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
private async Task Create(CreateOrEditCruiseAmenitiesStorageDto input) { var cruiseAmenitiesStorage = ObjectMapper.Map <AmenityStorage>(input); if (AbpSession.TenantId != null) { cruiseAmenitiesStorage.TenantId = (int?)AbpSession.TenantId; } await _cruiseAmenitiesStorageRepository.InsertAsync(cruiseAmenitiesStorage); }