Create an MVC Web API Project

In order to create an MVC Web API, you must need Visual Studio, ASP.Net framework 4.0 or above and MVC 4 template installed.

Steps to create basic MVC Web API:

  1. Open Visual Studio, select File > New > Project > Visual C# > Web > ASP.NET MVC 4 Web Application > Name: Your MVC Project Name and click OK.

    MVC Project Name
    MVC Project Name
  2. Select Web API project template from the list and click OK.

    MVC Web API
    MVC Web API Template
  3. Visual Studio will now create basic MVC Web API project. Here I have created a folder name Presentation to organize my code.

    Presentation Site API
    Presentation Web API
  4. You can now additional models, views and controllers based on your requirements. But for now I would like to add a class library under another folder Integration.

    Integration.Facebook Class Library
    Integration.Facebook Class Library
  5. Finally I will add Integration.Facebook Class Library and rename the Class1.cs to Helper.cs

    Facebook Helper Class
    Facebook Helper Class
  6. You can now add your logic in Helper.cs class. I will add sample code in my next post “Integration of Facebook”.
Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s