public async Task <GetCancellationPolicyForEditOutput> GetCancellationPolicyForEdit(EntityDto input)
        {
            CancellationPolicy cancellationPolicy = await _cancellationPolicyRepository.FirstOrDefaultAsync(input.Id);

            GetCancellationPolicyForEditOutput output = new GetCancellationPolicyForEditOutput {
                CancellationPolicy = ObjectMapper.Map <CreateOrEditCancellationPolicyDto>(cancellationPolicy)
            };

            if (output.CancellationPolicy.CruiseServicesId != null)
            {
                CruiseService _lookupCruiseServices = await _lookup_cruiseServicesRepository.FirstOrDefaultAsync((int)output.CancellationPolicy.CruiseServicesId);

                output.CruiseServicesServiceName = _lookupCruiseServices.ServiceName.ToString();
            }

            if (output.CancellationPolicy.CancellationPreText != null)
            {
                MasterAmenities _lookupMasterAmenities = await _lookup_MasterAmenitiesRepository.FirstOrDefaultAsync((int)output.CancellationPolicy.CancellationPreText);

                output.CruiseMasterAmenitiesDisplayName = _lookupMasterAmenities.DisplayName.ToString();
            }

            if (output.CancellationPolicy.CancellationPostText != null)
            {
                MasterAmenities _lookupMasterAmenities = await _lookup_MasterAmenitiesRepository.FirstOrDefaultAsync((int)output.CancellationPolicy.CancellationPostText);

                output.CruiseMasterAmenitiesDisplayName2 = _lookupMasterAmenities.DisplayName.ToString();
            }

            return(output);
        }
        private async Task Create(CreateOrEditCancellationPolicyDto input)
        {
            CancellationPolicy cancellationPolicy = ObjectMapper.Map <CancellationPolicy>(input);


            if (AbpSession.TenantId != null)
            {
                cancellationPolicy.TenantId = AbpSession.TenantId;
            }


            await _cancellationPolicyRepository.InsertAsync(cancellationPolicy);
        }
        private async Task Update(CreateOrEditCancellationPolicyDto input)
        {
            CancellationPolicy cancellationPolicy = await _cancellationPolicyRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, cancellationPolicy);
        }