コード例 #1
0
        public ProviderSiteViewModel CreateProviderSiteRelationship(ProviderSiteViewModel viewModel, int providerId)
        {
            var providerSiteRelationship = new ProviderSiteRelationship
            {
                ProviderId     = providerId,
                ProviderSiteId = viewModel.ProviderSiteId,
                ProviderSiteRelationShipTypeId = viewModel.ProviderSiteRelationshipType
            };

            _providerService.CreateProviderSiteRelationship(providerSiteRelationship);

            return(GetProviderSiteViewModel(viewModel.ProviderSiteId));
        }
        public static ProviderSiteRelationshipViewModel Convert(this ProviderSiteRelationship providerSiteRelationship)
        {
            var viewModel = new ProviderSiteRelationshipViewModel
            {
                ProviderSiteRelationshipId = providerSiteRelationship.ProviderSiteRelationshipId,
                ProviderId     = providerSiteRelationship.ProviderId,
                ProviderSiteId = providerSiteRelationship.ProviderSiteId,
                ProviderSiteRelationshipType = providerSiteRelationship.ProviderSiteRelationShipTypeId,
                ProviderUkprn           = providerSiteRelationship.ProviderUkprn,
                ProviderFullName        = providerSiteRelationship.ProviderFullName,
                ProviderTradingName     = providerSiteRelationship.ProviderTradingName,
                ProviderSiteFullName    = providerSiteRelationship.ProviderSiteFullName,
                ProviderSiteTradingName = providerSiteRelationship.ProviderSiteTradingName
            };

            return(viewModel);
        }
コード例 #3
0
 public ProviderSiteRelationship CreateProviderSiteRelationship(ProviderSiteRelationship providerSiteRelationship)
 {
     return(_providerSiteWriteRepository.Create(providerSiteRelationship));
 }