This document outlines the steps to explore and implement the .NET MVC8 framework for developing a pharmacy web application. The objective is to gain hands-on experience with the .NET MVC framework and create a functional web application that manages categories, products, orders, and users.
.NET SDK and Visual Studio Code (VSCode) for development.
create a new .NET MVC project using the following command:
dotnet new mvc -o project-name
The application consists of several models representing different entities:
- User Model.
- Product Model.
- Category Model.
- OrderItem Model.
- Order Model.
Add the necessary NuGet packages for Entity Framework Core and other dependencies.
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.Tools
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore
Use the .NET CLI to generate controllers, views, and data context.
dotnet aspnet-codegenerator controller -name ProductController -m Product -dc ApplicationDbContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries
Run the following commands to create the database:
dotnet ef migrations add InitialCreate
dotnet ef database update
To serve the purpose of initial understanding, a simple frontend has been created, including a navbar, footer, and home index screen.
- Authentication and Authorization
- Better UI/UX.
- Real orders and users Management.
- Testing and Deployment.