Repository navigation
Releases: DotNetBackendTraining/restaurant-reservation-system
Releases · DotNetBackendTraining/restaurant-reservation-system
Release list
Api Release - All Endpoints Implemented
Summary
- New ASP.NET Core Web API project named
RestaurantReservation.API. - API controllers for each entity and CRUD operations.
Full Changelog: v1.0.0...v2.0.0
Endpoints
- Includes CRUD and other specific endpoints for reservations.
- Endpoints for additional methods, including those related to reservations.
- GET
/api/employees/managers- List all managers. - GET
/api/reservations/customer/{customerId}- Retrieve reservations by customer ID. - GET
/api/reservations/{reservationId}/orders- List orders and menu items for a reservation. - GET
/api/reservations/{reservationId}/menu-items- List ordered menu items for a reservation. - GET
/api/employees/{employeeId}/average-order-amount- Calculate average order amount for an employee.
- GET
Authorization
- Secure the APIs using JWT authorization mechanism.
- Implement input validation and user-friendly error messages using Fluent Validations.
API Documentation with Swagger
- Integrate Swagger to auto-generate API documentation.
Testing
- Comprehensive Postman test suite to automatically test all the API endpoints.
- Include tests for successful operations and error handling.
- Share the Postman collection file.
Headless Release - Requirements Completed
Summary
-
This is mostly a Backend-only Release with:
- All requirements completed
- Several functional tests.
-
Full Changelog: v0.7.0...v1.0.0
Requirements
- Create a DB named
RestaurantReservationCore(using SSMS). - Create a console application project named
RestaurantReservation. - Create a library project named
RestaurantReservation.Dband reference it fromRestaurantReservation
project. - Create
RestaurantReservationDbContextand add it toRestaurantReservation.Db. - Create the data models for the above tables with all necessary keys, relationships, constraints, and navigations.
These models should exist inRestaurantReservation.Db - Write migrations to create the previous tables. Migrations should exist in
RestaurantReservation.Db. - Seed the tables with at least 5 records in each.
- In the
RestaurantReservationconsole application, demonstrate the functionality of all the methods you will
create by calling them with sample data for testing purposes. - Write
Create/Update/Deletemethods for each entity. - Write methods to:
ListManagers(): This method retrieves all employees who hold the position of "Manager."GetReservationsByCustomer(CustomerId): This method takes a customer identifier as a parameter and returns a
list of reservations made by that particular customer.ListOrdersAndMenuItems(ReservationId): This method takes a reservation identifier as a parameter and lists
the orders placed on that specific reservation along with the associated menu items.ListOrderedMenuItems(ReservationId): This method takes a reservation identifier as a parameter and finds
the menu items ordered in that specific reservation.CalculateAverageOrderAmount(EmployeeId): This method takes an employee identifier as a parameter and
calculates the average order amount for that specific employee.
- Views:
- Use EF Core to query a database view that lists all the reservations with their associated customer and
restaurant information. - Generate a query that retrieves employees with their respective restaurant details from a database view.
- Use EF Core to query a database view that lists all the reservations with their associated customer and
- Database Functions:
- Create a database function to
Calculate the total revenue generated by a specific restaurantusing Entity
Framework Core migrations. - Implement the function call in your
RestaurantReservation.Dbproject, making it accessible from your
application.
- Create a database function to
- Stored Procedures:
- Design a stored procedure for
Finding all customers who have made reservations with a party size greater than a certain valueusing Entity
Framework Core migrations. - Develop a method in your RestaurantReservation.Db project to execute the stored procedure.
- Design a stored procedure for
- Create a repository class for each entity and call it:
{EntityName}Repository.cs, and move related methods
from the previous requirements to the right repository. These repositories should exist inRepositories
folderRestaurantReservation.Db