Repository navigation
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