Click here to Skip to main content
15,879,348 members
Articles / Programming Languages / C#

Calling WCF Services: A better way than generating a proxy

Rate me:
Please Sign up or sign in to vote.
4.22/5 (15 votes)
17 Jul 2009CPOL5 min read 119.9K   2K   42  
How to create a generic WCF proxy using Generics and Lambda Expressions.

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 10
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFClient", "WCFClient.csproj", "{1BC7B842-B158-461F-B000-172B4688011B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFInterface", "WCFInterface\WCFInterface.csproj", "{C8993A03-8274-4306-B574-6D3245A998A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WcfService1", "WcfService1\WcfService1.csproj", "{B0B31094-535E-44BE-8D44-C484E934FF29}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFProxy", "WCFProxy\WCFProxy.csproj", "{82163CD6-C16C-44F5-9823-7223A37C2894}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Debug|Mixed Platforms = Debug|Mixed Platforms
		Debug|x86 = Debug|x86
		Release|Any CPU = Release|Any CPU
		Release|Mixed Platforms = Release|Mixed Platforms
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{1BC7B842-B158-461F-B000-172B4688011B}.Debug|Any CPU.ActiveCfg = Debug|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Debug|Mixed Platforms.Build.0 = Debug|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Debug|x86.ActiveCfg = Debug|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Debug|x86.Build.0 = Debug|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Release|Any CPU.ActiveCfg = Release|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Release|Mixed Platforms.ActiveCfg = Release|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Release|Mixed Platforms.Build.0 = Release|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Release|x86.ActiveCfg = Release|x86
		{1BC7B842-B158-461F-B000-172B4688011B}.Release|x86.Build.0 = Release|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Debug|Any CPU.ActiveCfg = Debug|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Debug|Mixed Platforms.Build.0 = Debug|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Debug|x86.ActiveCfg = Debug|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Debug|x86.Build.0 = Debug|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Release|Any CPU.ActiveCfg = Release|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Release|Mixed Platforms.ActiveCfg = Release|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Release|Mixed Platforms.Build.0 = Release|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Release|x86.ActiveCfg = Release|x86
		{C8993A03-8274-4306-B574-6D3245A998A0}.Release|x86.Build.0 = Release|x86
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Debug|x86.ActiveCfg = Debug|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Release|Any CPU.Build.0 = Release|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{B0B31094-535E-44BE-8D44-C484E934FF29}.Release|x86.ActiveCfg = Release|Any CPU
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Debug|Any CPU.ActiveCfg = Debug|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Debug|Mixed Platforms.Build.0 = Debug|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Debug|x86.ActiveCfg = Debug|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Debug|x86.Build.0 = Debug|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Release|Any CPU.ActiveCfg = Release|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Release|Mixed Platforms.ActiveCfg = Release|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Release|Mixed Platforms.Build.0 = Release|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Release|x86.ActiveCfg = Release|x86
		{82163CD6-C16C-44F5-9823-7223A37C2894}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Imfinity
India India
Hi I have been working on enterprise applications for last six years.

Comments and Discussions