Learn C#, MVC, jQuery,AngularJS

Learn C#,MVC,jQuery,AngularJS

Stashing in GIT

While working in git we sometimes makes some changes in the working directory but don’t want to commit those changes.Suppose you are implementing some new feature.Now you are required to change to a different branch.If you change the branch without...

Committing files in Git

Three states of files in git at any point of time a file in git can be in 1 of the following three states modified a file is just modified.You have changed the contents of the file but the file...

Node Package Manager -NPM

Node Package Manager or NPM is a command line tool used while working with Node.js. NPM provides the following features for Node.js developers: As there are lots of packages for Node.js ,NPM makes it easier to manage them.It represents a...

Enum in TypeScript

Enum is a group of numeric contants.TypeScript supports enum since version 0.9. Enums are useful for representing values which can have one of a fixed set of values.For example we can represent employee type with the following enum:

One...

HTTP method attributes in WebAPI

Action methods are selected in WebAPI based on the HTTP method used to make the request.This means that if HTTP GET method is used to make the request then action methods whose names are beginning with Get are selected.For example following action method...

Constructor in TypeScript

TypeScript is used for object oriented programming.ECMAScript 6 also supports object oriented programming. Like other object oriented languages ,classes in typescript have a constructor.If we don’t explicitly specify constructor then it will have a default constructor.This default constructor initializes the properties of...

CORS in WebAPI 2

Web applications are more vulnerable to security risks.Browsers impose some restrictions to make web applications secure.One such security measure is called same origin policy.Same origin policy prevents a web page to make AJAX requests to different domain. This means the web page...

Content Negotiation in HTTP

Client such as web browser requests a resource (such as HTML document)at a specific URL.In response ,server returns the resource at the requested URL to the client.When the server returns the resource at the requested URL ,it choses a specific...

IHttpActionResult in WebAPI

IHttpActionResult  is an interface which was introduced in WebAPI 2.It is used to create HttpResponseMessage which is one of the return types in WebAPI. Use of IHttpActionResult Using IHttpActionResult  to return HttpResponseMessage object instead of directly returning the HttpResponseMessage object has the following advantages:...

Media Formatters in ASP.NET Web API

Media Type or MIME type specifies the data being transfered between the client and server in HTTP request or response. The MIME type for image is image/png.So if the MIME type is specified as image/png for Content-Type of the response...