Implementation: Let's create our first Asp.Net MVC web application.
- Open Visual Studio -> File -> New -> Project
- Select you preferred language either Visual C# or Visual Basic. For this tutorial we will use Visual C#.
- Name the project "MvcApplication9". Specify the location where you want to save this project as shown in image below. Click on Ok button.

- It will add the required files and folder automatically as shown in image below.

- You can run the application using F5 or from the Debug menu of Visual Studio select Start Debugging. You will see the page as shown below:

Creating Model
- Right Click on the Models folder of the project -> Add -> Class as shown in image below
Name the class "MyMovieClass.cs"
MyMovieClass.cs
Creating Controller
- Right click on the Controller folder -> Add -> Controller as shown below.
Template: MVC Controller with read/write actions and views, using Entity Framework.
Model class: MyMovieClass(MvcApplication9.Models)
Data context class: MovieDetails(MvcApplication9.Models)
Views: Razor (CSHTML). - Congrats you have created the MVC application having Create, Read, Update and Delete (CRUD) functionality.
- Run the application using F5
- browser: http://localhost:4894/moviedetails/.
Clicking on "Create New" Button will open the screen as shown in image below.
Add the details and save some records e.g. as shown in image below:
help articel,but sir i want to perfrom the
ReplyDeletecrud operation in mvc with entity framework using scaffolding how i can do that please write a post for that.