Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • ASP.NET Core 2 Fundamentals
  • Toc
  • feedback
ASP.NET Core 2 Fundamentals

ASP.NET Core 2 Fundamentals

By : Gumus, T. S. Ragupathi
2 (1)
close
ASP.NET Core 2 Fundamentals

ASP.NET Core 2 Fundamentals

2 (1)
By: Gumus, T. S. Ragupathi

Overview of this book

The book sets the stage with an introduction to web applications and helps you build an understanding of the tried-and-true MVC architecture. You learn all about views, from what is the Razor view engine to tagging helpers. You gain insight into what models are, how to bind them, and how to migrate database using the correct model. As you get comfortable with the world of ASP.NET, you learn about validation and routing. You also learn the advanced concepts, such as designing Rest Buy (a RESTful shopping cart application), creating entities for it, and creating EF context and migrations. By the time you are done reading the book, you will be able to optimally use ASP.NET to develop, unit test, and deploy applications like a pro.
Table of Contents (10 chapters)
close

Using Entity Framework in ASP.NET MVC Applications

There is not much difference between using Entity Framework in a console application and the ASP.NET MVC application. Now, we are going to build a simple application with a single screen, as shown in the following screenshot.

In this screen, we will have a form where the user will enter the information about the employee; once the user submits the form, the information will be saved to the database as shown in the following screenshot:

We can create a simple model for the employee. We need to build a ViewModel for this view, as we need to get the employee information from the user and we also need to show a list of employees on the same screen.

The following are the step-by-step instructions to create the application for the previously mentioned objective:

  1. Create an ASP.NET Core project in Visual Studio by selecting an empty...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete