Skip to content

Cleanup: Remove duplicate service registrations#219

Open
nbhansen wants to merge 11 commits intoaau-giraf:stagingfrom
nbhansen:fix/duplicate-service-registrations
Open

Cleanup: Remove duplicate service registrations#219
nbhansen wants to merge 11 commits intoaau-giraf:stagingfrom
nbhansen:fix/duplicate-service-registrations

Conversation

@nbhansen
Copy link

@nbhansen nbhansen commented Feb 4, 2026

Summary

Remove duplicate dependency injection registrations in Program.cs.

Changes

  • Remove duplicate PostgreSQLConnectionFactory registration
  • Remove duplicate IIngredientService, IMealService, IPackedIngredientService registrations

Details

The following services were registered twice:

  • PostgreSQLConnectionFactory at lines 115-124 (duplicate of lines 237-246)
  • IIngredientService, IMealService, IPackedIngredientService at 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 build passes
  • dotnet test passes (158 tests)

pSlessing and others added 11 commits February 4, 2026 20:04
- 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>
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.

2 participants