ASP .NET Core Project for learning. Every one should be able to use this templae to build a ASP .NET Core web MVC with PostgreSQL database.
- Product's Crud
- Entity Framework Core
- AspNetCore Identity UI
- AdminLte
- PostgreSQL
- AutoMapper
These instructions will get you to setup the project, install sdk and add package (CLI or Package manager console).
- Visual Studio 2022 or higher
- .NET 7.x SDK
- Npgsql.EntityFrameworkCore.PostgreSQL 7.0.11 (https://www.nuget.org/packages/Npgsql.EntityFrameworkCore.PostgreSQL/)
- Install .net SDK 7
Download .NET SDK here. - Create new Web API's project
dotnet new mvc –-name ASP.NET-Core7.MVC
- Add package
- Entity Framework Core 7.0.13
dotnet add package Microsoft.EntityFrameworkCore -v 7.0.13
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL -v 7.0.11
- AutoMapper
dotnet add package AutoMapper.Extensions.Microsoft.DependencyInjection
- Code Generate
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design -v 7.0.11
- Entity Framework Core 7.0.13
- Code generate (in this case I don't use it. I just clone from github some paths what I want to implement)
- Generate Identity UI
dotnet aspnet-codegenerator identity -h
- Generate Identity UI
- Migrate Model to Database
- Command Line
Add Migrationdotnet ef migrations add INITDB
Update to DBdotnet ef database update
- Package Manager Console
Add Migrationadd-migration INITDB
Update to DBupdate-database
- Command Line