Skip to content

Feature/1 localdb ef migrations#3

Merged
halinhtvn3a merged 11 commits intomainfrom
feature/1-localdb-ef-migrations
Jul 15, 2025
Merged

Feature/1 localdb ef migrations#3
halinhtvn3a merged 11 commits intomainfrom
feature/1-localdb-ef-migrations

Conversation

@halinhtvn3a
Copy link
Copy Markdown
Owner

No description provided.

Introduces the new CourtCaller.Persistence project with entity configurations, DbContext, and data seeding infrastructure. Refactors DAOs and tests to use the new persistence layer, removing the old DbContext from DAOs. Cleans up and standardizes method signatures and imports, and removes the WeatherForecast sample controller and model from the API.
Added using statements for CourtCaller.Persistence in multiple repository test files and included a project reference to CourtCaller.Persistence in UnitTests.csproj. This ensures the test projects have access to the necessary persistence layer for testing.
Introduces a robust database seeding system with configuration, dependency injection, and multiple seeding strategies. Adds migration for initial database creation, updates .gitignore, and modifies API startup to execute seeding in development. Also updates project files to include seed data and comments out direct role seeding in DbContext in favor of migration-based seeding.
Introduced seed data files for Bookings, Branches, Courts, News, Payments, Prices, RegistrationRequests, Reviews, TimeSlots, and UserDetails in the CourtCaller.Persistence/Data/Seed directory. These files provide sample data for application startup and testing, covering all major entities and their relationships as described in the included README.
Introduces a comprehensive ProductionDeploymentGuide.md detailing configuration, environment variables, seeding strategies, security, performance, monitoring, and deployment steps for running CourtCaller in Docker containers with production settings.
Refactored exception handling in JsonDataSeeder and FileReader to preserve original exception details and use more appropriate exception types. Updated BookingDAO to use FromSqlInterpolated for safer SQL queries. Modified PayLib to use ToLowerInvariant for IP address checks. Commented out appsettings.Development.json inclusion in CourtCaller.Persistence.csproj.
cursor[bot]

This comment was marked as outdated.

Introduced overloads for GetBranches and GetReview methods in DAOs, repositories, and services to support queries with and without status and search parameters. Updated method signatures to use nullable reference types and improved consistency across layers. Also changed some constants to static readonly for better flexibility.
Deleted redundant GetBranches methods that accepted only a status parameter from BranchDAO, BranchRepository, and BranchService. This streamlines the API and reduces maintenance of unused overloads.
cursor[bot]

This comment was marked as outdated.

Introduced a new BuildingBlocks.Logging project with Serilog integration, enrichers, and configuration options. Updated API to use the new logging setup and added the project reference. Refactored method signatures in DAOs, repositories, and services for consistency. Minor code formatting improvements and updated the solution file to include the new logging project.
@halinhtvn3a halinhtvn3a merged commit a00f11c into main Jul 15, 2025
1 of 2 checks passed
@halinhtvn3a halinhtvn3a deleted the feature/1-localdb-ef-migrations branch July 15, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant