Lesson 2 - E-shop in ASP.NET Core MVC - Identity, database, and layout
In the previous lesson, E-shop in ASP.NET Core MVC - Solution Structure, we explained that larger applications need to be divided into multiple layers, and also prepared the structure of our solution. In today's ASP.NET Core tutorial, we're going to install the necessary packages for our project and put the user and database logic into the data layer. We'll continue by generating a database, including the basic settings. We'll also work on a visually appealing layout for the application.
NuGet package manager
Before we move to the data layer, let's install the necessary packages into this project to avoid errors and make editing the code easier. We'll use the NuGet Package Manager to install the following packages into our project. To do this, we'll use the application menu and choose Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution. Here, we'll choose the Browse tab and download and install the necessary packages:
(We'll use some of these packages later).
Another way is to use the Package Manager Console. We could install the packages by the following command:
Moving the prepared classes into the data layer
Let's first move (create) a part of the Identity functionality into the data layer. Since we'll want to extend our users in the future,
...End of the preview...
Commercial article (licence no-reselling)
This article is based on many years of experience in the IT field, and describes how to develop a professional commercial product or parts, that can be directly used to generate profit or to get as a gate into the industry.
This knowledge is only can only be used properly by the members of our community who are working their way up to become IT professionals. Therefore, this knowledge is only available in exchange for points. You can use the source code from this article for one commercial project. However, you will not be able to resell it. Simply put, you can't buy our article once and then sell our code multiple times. If you need to use this code a bit more extensively, we are ready to discuss Commercial licence options with you. You can find more info on this in the following article Licence.
Are you ready to become a professional? All you have to do is click here!.
Requested article covers this content:
In this ASP.NET Core tutorial, we'll set the connection string, manage migrations, make adjustments before generating the database and set up the design.
Buying this article gives you unlimited access to it forever. You will learn some more and help us keep giving our site maintenance which helps you and others get better futures. It's a win-win.
You gain points by supporting our network. This is done by sending a helpful amount of money to support the site, or by creating content for the network.
You can get points immediately using:
|Credit card||SMS||Wire transfer|