Accessing WCF service without creating Proxy

Each time when we want to consume a WCF service, we need to create proxy at client side. To create proxy, service must expose metadata endpoint. Normally 1. We create a WCF service 2. Expose metadata endpoint 3. Add service reference at client side to create the proxy. 4. Using the proxy calls the service … Continue reading Accessing WCF service without creating Proxy

Versioning in WCF Data Contract Part #2: Missing Members

Part #1 of the article can be read here If we have a DataContract Product.cs ServiceContract is as below IService1.cs And Service implementation is as below, Service1.svc.cs Now we have a service. Now at the client side (Say it as client1) we are calling the service as below Program.cs Output Now let us go ahead … Continue reading Versioning in WCF Data Contract Part #2: Missing Members

Versioning in WCF Data Contract Part #1: Adding New Members

DataContract versioning requires when some modification has been done to the existing DataContract exposed to the client from the service or vice versa. If either service or client is changing the schema of DataContract exposed then new version of DataContract come into action and both party involved in communication should be able to accommodate the … Continue reading Versioning in WCF Data Contract Part #1: Adding New Members

Serialization order in Data Contract

If you have a Data Contract in your WCF service as below, Student.cs On serialization properties of data contract will get serialized in alphabetical order. So at the client side serialized data contract will look like So we can see in serialized data contract at the client side properties are serialized in alphabetical order. Now … Continue reading Serialization order in Data Contract

Using Lambda expression in FindAll()

I got a critical comment from @amazedsaint. You can read his blog http://amazedsaint.blogspot.com/ If you read my previous post http://dhananjaykumar.net/2010/10/01/findall-finding-multiple-items-in-c-list/ , I am using a method GreaterThanHun As predicate to pass as parameter to FindAll() Instead of that we can use 1. Anonymous method 2. Lambda expression So, I am going to show you here … Continue reading Using Lambda expression in FindAll()

FindAll() : Finding multiple items in C# List

Let us say we have a list of integer and we want to find all the number greater than 100. If list is as follow List<int> lst = new List<int>();             lst.Add(20);             lst.Add(300);             lst.Add(400);             lst.Add(9);             lst.Add(19);             lst.Add(789);     … Continue reading FindAll() : Finding multiple items in C# List