MediChain is a .NET 8.0 web application that manages product data and user authentication using ASP.NET Core Identity. The project is built using Entity Framework Core with support for MSSQL and SQLite databases.
- User Authentication (Login, Register) via ASP.NET Core Identity
- Product management (CRUD operations on product data)
- Entity Framework Core for data access
- Database support: MSSQL and SQLite
- Pomelo EntityFramework Core for MySQL integration (optional)
- .NET SDK 8.0
- ASP.NET Core Identity
- Entity Framework Core
- SQLite (Primary database)
- MSSQL (Optional database configuration)
- Razor Pages
- Microsoft Visual Studio Code / Rider
MediChain is a web application built using ASP.NET Core with Entity Framework Core. This project is designed to work with both MSSQL and SQLite databases. Follow the steps below to set up and run the project.
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (v8.0.10)
- Microsoft.AspNetCore.Identity.UI (v8.0.10)
- Microsoft.EntityFrameworkCore (v8.0.10)
- Microsoft.EntityFrameworkCore.Sqlite (v8.0.10)
- Microsoft.EntityFrameworkCore.SqlServer (v8.0.10)
- Microsoft.EntityFrameworkCore.Tools (v8.0.10)
- Microsoft.VisualStudio.Web.CodeGeneration.Design (v8.0.6)
Clone the repository to your local machine using Git:
git clone https://github.com/jeetbhuptani/MediChainMVC.git
Once cloned, navigate to the project folder:
cd MediChain
Run the following command to restore all necessary NuGet packages and dependencies:
dotnet restore
By default, the project is set up to use MSSQL, but you can configure it to use SQLite as well. To do this, modify the appsettings.json file.
Ensure that the appsettings.json file contains the following configuration:
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=MediChain;Trusted_Connection=True;TrustServerCertificate=True"
}
If you prefer to use SQLite, change the connection string to:
"ConnectionStrings": {
"DefaultConnection": "Data Source=MediChain.db"
}
Make sure to update the connection string according to your preferred setup.
To set up the database schema and apply the migrations, run the following command:
dotnet ef database update
This command ensures that the database is properly created and configured based on the latest migrations.
After completing all the above steps, you can start the MediChain web application by running the following command:
dotnet run