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); }
public ProviderSiteRelationship CreateProviderSiteRelationship(ProviderSiteRelationship providerSiteRelationship) { return(_providerSiteWriteRepository.Create(providerSiteRelationship)); }