- C#
- ASP.NET (Razor Pages; ASP.NET Identity)
- .NET (v8.0.101)
- Entity Framework
-
to create a new project.
dotnet new razor -o <projectName> --auth Individual
-
Install Entity Framework package for SQLite.
dotnet add package Microsoft.EntityFrameworkCore.SQLite
-
Install dotnet-ef.
dotnet tool install --global dotnet-ef
-
Create migrations.
dotnet ef migrations add <migrationsName>
-
Update database.
dotnet ef database update
-
Scaffolding (creating controllers and views with one command).
dotnet tool install -g dotnet-aspnet-codegenerator
-
Generate the code based on Entity Framework.
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet aspnet-codegenerator razorpage Create Create -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students
dotnet aspnet-codegenerator razorpage Edit Edit -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students
dotnet aspnet-codegenerator razorpage Index List -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students
dotnet aspnet-codegenerator razorpage Details Details -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students
dotnet aspnet-codegenerator razorpage Delete Delete -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students
dotnet aspnet-codegenerator razorpage Create Create -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions
dotnet aspnet-codegenerator razorpage Edit Edit -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions
dotnet aspnet-codegenerator razorpage Index List -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions
dotnet aspnet-codegenerator razorpage Details Details -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions
dotnet aspnet-codegenerator razorpage Delete Delete -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions
- to run this project:
-
Clone the repository.
dotnet tool install --global dotnet-ef
-
Run Application.
dotnet run
The foundation of the open source community are the contributions, them inspire us to learn and create. Any contributions are greatly appreciated.
This project is licensed under the MIT License. See the LICENSE.md file for details.