One of the most frequent unnecessary issues I see introduced into a client's code base, is over the usage of ToList(). It's such a simple extension but so many developers balls it up really badly. Here is an obvious example in question:
I was performing a code and one of the developers needed to return a success/failure result from a method and in the event of an error, return an error message. To solve the problem he used an out parameter like this:
public bool IsSuccess(strin[...]
On a recent project, I had a very unusual requirement, the user's session (from the HTTP Context) should be accessible to an external web API. Although Microsoft does not recommend this practice for several reasons, like:
It breaks the RESTFUL[...]
In today's tutorial I will demonstrate how to implement a simple service that takes in a GUID and returns an int, how to host it in IIS and how to test it in the WCFTest tool to make sure it works.
Step One - Create the service