This project is a .NET application built using ASP.NET Core and Entity Framework Core. It is designed to demonstrate various features of a web application, including MVC architecture, database migrations, and logging.
- .NET SDK 8.0 or later
- A code editor like Visual Studio or Visual Studio Code
-
Clone the repository:
git clone <repository-url> cd Day-10
-
Restore the dependencies:
Run the following command to restore the NuGet packages:
dotnet restore
-
Build the project:
Build the project using the following command:
dotnet build
-
Run the application:
Start the application with:
dotnet run
The application will be available at
http://localhost:5000
.
The application uses appsettings.json
and appsettings.Development.json
for configuration. The logging configuration is set to log information level messages by default and warnings for Microsoft.AspNetCore
.
json:appsettings.Development.json startLine: 1 endLine: 8
Entity Framework Core is used for database migrations. To apply migrations, use the following command:
dotnet ef database update
To add a new migration, use:
dotnet ef migrations add <MigrationName>
- Controllers: Contains the MVC controllers for handling HTTP requests.
- Models: Contains the data models used in the application.
- Migrations: Contains the Entity Framework Core migrations.
- Views: Contains the Razor views for the application.
- wwwroot: Contains static files like CSS, JavaScript, and images.
The application uses ASP.NET Core's built-in logging framework. The logging configuration can be adjusted in the appsettings.json
files.
This project is licensed under the MIT License - see the LICENSE file for details.
- ASP.NET Core Documentation
- Entity Framework Core Documentation