Contents tagged with ASP.Net Web Api
-
The String Interpolation ($) Special Character
While developing applications, it is quite common that you are required to produce formatted output. This is a common scenario for any developer whether you develop console application, web application or Mobile application. With C# 6 onwards Microsoft introduced a special character called interpolation operator ($) to help developers easily manipulate the string literals.
In this article, I am briefly explaining the interpolation operator with the help of couple of examples.
Let us consider the example of adding two numbers and print their sum as the output. Very simple example. The below is the old (ugly) way of doing this in C# with ASP.Net.
int a = 2, b = 3, sum = a + b;
Response.Write("The sum of " + a + " and " + b + " is " + sum);
-
Web API - Documentation & Testing
ASP.Net Web API is a framework for building HTTP Services. ASP.Net Web API makes it easy to write Restful applications on the .Net framework. Writing HTTP services is part of almost every developer’s job.
-
ASP.Net Web API in Visual Studio 2010
Recently for one of my project, it was necessary to create couple of services. In the past I was using WCF, since my Services are going to be utilized through HTTP, I was thinking of ASP.Net web API. So I decided to create a Web API project. Now the real issue is that ASP.Net Web API launched after Visual Studio 2010 and I had to use ASP.Net web API in VS 2010 itself. By default there is no template available for Web API in Visual Studio 2010.