Cleanup: Remove duplicate service registrations#219
Open
nbhansen wants to merge 11 commits intoaau-giraf:stagingfrom
Open
Cleanup: Remove duplicate service registrations#219nbhansen wants to merge 11 commits intoaau-giraf:stagingfrom
nbhansen wants to merge 11 commits intoaau-giraf:stagingfrom
Conversation
- Fix MealService: use p.Ingredient_id directly, add UserId to DTO - Fix MealCreateDTO: Template should default to false, not be required - Add minio/ and postgres/ to gitignore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Renumber PR migrations to avoid conflicts with staging: - 10_AddTemplateToMeals -> 14_AddTemplateToMeals - 11_AddSubIngredients -> 15_AddSubIngredients Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed: - Duplicate PostgreSQLConnectionFactory registration (lines 115-124) - Duplicate IIngredientService, IMealService, IPackedIngredientService registrations (incorrectly placed in repositories section) These services were registered twice, which is unnecessary and confusing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove duplicate dependency injection registrations in Program.cs.
Changes
PostgreSQLConnectionFactoryregistrationIIngredientService,IMealService,IPackedIngredientServiceregistrationsDetails
The following services were registered twice:
PostgreSQLConnectionFactoryat lines 115-124 (duplicate of lines 237-246)IIngredientService,IMealService,IPackedIngredientServiceat lines 198-200 (duplicate of lines 219-221)Kept the registrations that are in the correct section (services grouped with other services, connection factory grouped with database setup).
Test plan
dotnet buildpassesdotnet testpasses (158 tests)