From ee4df116d13eb54a7088c9641c6c2447941fc9b1 Mon Sep 17 00:00:00 2001 From: Amin <69254513+AminGh05@users.noreply.github.com> Date: Thu, 26 Jun 2025 01:46:39 +0330 Subject: [PATCH] Update Session08 Backend.md fixed some parts of fixes --- .../Session08/Session08 Backend.md | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/ProjectOrientedSessions/Session08/Session08 Backend.md b/ProjectOrientedSessions/Session08/Session08 Backend.md index bd54829..68339a5 100644 --- a/ProjectOrientedSessions/Session08/Session08 Backend.md +++ b/ProjectOrientedSessions/Session08/Session08 Backend.md @@ -1,12 +1,24 @@ +# Session 8 +Profile + some fixes to database +## Fixes +- [ ] Check for missing `.ValueGeneratedOnAdd()` in all entity configurations in ```Infrastructure/Configurations```. -# Fixes -- [ ] Check for missing `.ValueGeneratedOnAdd()` in all entity configuration. - [ ] Adjust the database setup according to the second version of ERD -- [ ] new erd: https://github.com/TheOrderOfPhoenix/ASP.NET/blob/main/02_ProjectOrientedSessions/docs/AlibabaERD-Version02.pdf -- [ ] Pay attention to the changes in logic and implementation of Person table (Id number is not unique anymore) -- [ ] Add actual data in `TicketStatus`, `Gender`, `TransactionTypes` -- [ ] Add data in `Seat`, `Person`, `TicketOrder`, `Transaction`, `Ticket` for test. It is recommended to write python code for generating data for Seat table, according to the data already stored in Transportation and related Vehicle data + - Some aggregates are added/modified to generate the new database + - New ERD: https://github.com/TheOrderOfPhoenix/ASP.NET/blob/main/ProjectOrientedSessions/docs/AlibabaERD-Version02.pdf + - Note: Pay attention to the changes in logic and implementation of Person table (Id number is not unique anymore). So remove this code in PersonConfiguration: + + ``` + builder.HasIndex(p => p.IdNumber) + .IsUnique(); + ``` + +- [ ] Add actual data in `TicketStatus`, `Gender`, `TransactionTypes` + - You can either add the data in DbContext or the database itself + +- [ ] Add data in `Seat`, `Person`, `TicketOrder`, `Transaction`, `Ticket` for test. It is recommended to write python code for generating data for Seat table, according to the data already stored in Transportation and related Vehicle data. There is also a SeatGenerator in this repository, as well. + - [ ] Fix claim extraction (`sub` → standardize JWT claim mapping). (`IUserContext` implmentation) ### ✅ Profile Page (Account Info Tab)