This project aims to develop a comprehensive restaurant management system that streamlines various aspects of restaurant operations, including employee management, table assignment, food ordering, and order tracking.
The main challenge is to design the database schema, conneting the database and migration. For the order item table I have missing the foreign key and thats why a cyclick situation is occured.
- User Authentication: In this web api, the authentication and authorization is implemented by dot net entity role. JWT is used for generate the bearer token.
- CRUD Operation: For employee, table, food, employeeTable, order entites - CRUD operation is implemented following respository and unit of work pattern.
- Endpoint: API endpoints for all controller is implemented following respository and unit of work pattern.
- Respository Pattern with Unit of Work
- N-Tier Architecture
- ASP.NET Core (8.0.3)
- SQLServer Database
- Microsoft.AspNetCore.Authentication.JwtBearer, Version="8.0.3"
- Microsoft.AspNetCore.Identity.EntityFrameworkCore, Version="8.0.3"
- Microsoft.AspNetCore.OpenApi, Version="8.0.3"
- Microsoft.EntityFrameworkCore, Version="8.0.3"
- Microsoft.EntityFrameworkCore.SqlServer, Version="8.0.3"
- Microsoft.EntityFrameworkCore.Tools, Version="8.0.3"
- Microsoft.IdentityModel.Tokens, Version="7.4.1"
- Swashbuckle.AspNetCore, Version="6.4.0"
- Swashbuckle.AspNetCore.Filters, Version="8.0.1"
- System.IdentityModel.Tokens.Jwt, Version="7.4.1"
Username: admin@mail.com
Password: Admin@123
Change the Server Name and Localhost Port at appssettings.json
"ConnectionStrings": {
"DefaultConnection": "Server = Your_Server_Name_Here; Database = RestaurantsDB;
Trusted_Connection = True; MultipleActiveResultSets=true; TrustServerCertificate = True"
},
"Jwt": {
"Key": "Your_GUID_Key",
"Issuer": "https://localhost:Your_Port_Number/",
"Audience": "https://localhost:Your_Port_Number/"
}
Change the port number at program.cs file
builder.Services.AddCors(options => options.AddPolicy(name: "Custom_Name",
policy => { policy.WithOrigins("http://localhost:Your_Port_Number/")
.AllowAnyMethod().AllowAnyHeader().AllowAnyOrigin(); }));
Open Package Manager Console and Type (Change Default Project : Data)
add-migration YourMigrationName
update-database
After install and setup the project when run the project then the output will be shown like as the output.