public ActionResult Index() { ServiceReference1.ServicePCClient pc = new ServiceReference1.ServicePCClient(); Task <Post> post = pc.GetPostByIdAsync(1); return(View(post)); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(ServicePCClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IServicePC)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(ServicePCClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IServicePC)); }
public ServicePCClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(ServicePCClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public ServicePCClient(EndpointConfiguration endpointConfiguration) : base(ServicePCClient.GetBindingForEndpoint(endpointConfiguration), ServicePCClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public ServicePCClient() : base(ServicePCClient.GetDefaultBinding(), ServicePCClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IServicePC.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }