In this article you will learn how to do basic CRUD operations with Visual Studio 2013.
Look at the following image:MVC Project Prerequeste:
Create MVC5 Project
It will create a new MVC5 project with Entity Framework 5/6 already installed, if it is not installed then install it from the nuGet Repository from: NuGet.Database design
Create Data Model
Performing CRUD operation [Model] : EmployeeModelIt consists of the 2 main Files EmployeeModel.Context.tt and EmployeeModel.tt.In EmployeeModel.Context.tt – It consists of EmployeeModel.Context.csEmployeeModel.Context.cs: It consists of a dbStudentEntities class for the connection string context.
Creating ControllerStep 1
Right-click on the Controller, Select Controller. It will open an Add Scaffold window.Step 2
Select MVC5 Controller with views, using Entity Framework.Step 3
It will automatically create a Controller with all the necessary operations.
Step 4
It will automatically create a View for performing CRUD operations.Create.cshtml
Programming ASP.NET MVC 5