What started out as a reverse-scaffolding of WideWorldImporters DB, has now grown into a full on tinkering project.
Documentation is now in reverse-chronological order:
- All Stored Procedures are now created after all EFMigration changes (See my reply to Open Issue #24710)
- Stored Procedures for DB setup are immediately run after (Other DB Maintenance e.g. Index Rebuilding can be run here too)
- Also debugged the Scripts for FullTextIndexing & PartitionTableCreation Stored Procedures
- Also enabled FullText for Dockerised SQL Server (Thankfully, it can work on SQL Server Express)
- Finally, also noted the importance of SQL Server Schema Compare for CodeFirst development
- Added EF Migration script approach to creating Stored Procedures on Migrate => This does not run the said created SPs => This is either a risky approach, or error-prone, or both...
- Tidied up OnModelCreating using the OnModelCreatingPartial auto-generated via DbFirst
- Added original table & column comments from the original DB
- Also noted that reverse-scaffolding might have led to incorrect max char length declarations in EntityConfigurations for nVarChar columns (e.g. 10 -> 18, 100 -> 107, 256 -> 264) => TODO: Explore SQL Server Schema Compare in Azure Data Studio
***HiddenMain has been merged to Main Branch
- SQL Bundle Command (Run on same Layer as Program/StartUp; generate bundle on Migrations Layer):
dotnet ef migrations script -o ../efmigrations/initial_idempotent.sql --idempotent
HiddenMain Branch (Last Updated 29 Oct 2022):
- Reverse-scaffolded WideWorldImporters DB.
- Implemented EFMigrations Layer by following Microsoft Doc. Use case is for instances of multiple Migration files being added during Development, especially for large DBs and/or multiple EF Migration scripts.
- Added Architecture Unit Tests.
- Skeleton Layout was a Dependency Injection puzzle for Yun Cong.