Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move EF Core configurations to feature folders for better vertical slice architecture#16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-b82a5844-5fbb-420b-b588-d4a567700ba6

Conversation

Copy link

CopilotAI commentedOct 2, 2025
edited
Loading

Problem

TheIEntityTypeConfiguration files were placed in/Infrastructure/Persistence/Configurations/ instead of being co-located with their related features in theFeatures/ directory. This violated the vertical slice architecture principle of keeping all related code together by feature rather than separating by technical concerns.

Solution

Moved the Entity Framework Core configuration files to their respective feature folders:

  • TodoItemConfiguration.csFeatures/TodoItems/TodoItemConfiguration.cs
  • TodoListConfiguration.csFeatures/TodoLists/TodoListConfiguration.cs

Updated the namespaces to match their new feature-specific locations and removed the now-empty/Configurations/ directory.

Why This Improves the Architecture

Before: Developers working on TodoItem features had to navigate between/Features/TodoItems/ for business logic and/Infrastructure/Persistence/Configurations/ for database configuration.

After: All TodoItem-related code (controllers, commands, handlers, validators, domain events, and EF configuration) now lives together inFeatures/TodoItems/.

This change aligns with the project's stated goal from the README:

The goal is to stop thinking about horizontal layers and start thinking about vertical slices and organize code byFeatures. When the code is organized by feature you get the benefits of not having to jump around projects, folders, and files. Things related to given features are placed close together.

Technical Verification

  • ✅ EF Core'sApplyConfigurationsFromAssembly() automatically discovers configurations regardless of their location in the assembly
  • ✅ All existing tests pass + added new tests to verify configurations are still applied correctly
  • ✅ Application builds and runs successfully with proper database schema constraints
  • ✅ No breaking changes to existing functionality

The move demonstrates that infrastructure concerns can and should be organized by feature when they are feature-specific, rather than being artificially separated into technical layers.

Original prompt

This section details on the original issue you should resolve

<issue_title>Why did you choose to seperate the Infra - Configurations?</issue_title>
<issue_description>Hello!

I was wondering why you made the decision to group theIEntityConfiguration types in the/Infrastructure/configuration/ while everything else pertaining to theToDoItem was in theFeature area. I would think that theIEntityConfiguration files are included in theFeature area

</issue_description>

Comments on the Issue (you are@copilot in this section)

Fixes#8

✨ Let Copilot coding agentset things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the@coderabbitai review command.

You can disable this status message by setting thereviews.review_status tofalse in the CodeRabbit configuration file.


Comment@coderabbitai help to get the list of available commands and usage tips.

CopilotAIand others added2 commitsOctober 2, 2025 13:49
…ice architectureCo-authored-by: nadirbad <33620914+nadirbad@users.noreply.github.com>
Co-authored-by: nadirbad <33620914+nadirbad@users.noreply.github.com>
CopilotAI changed the title[WIP] Why did you choose to seperate the Infra - Configurations?Move EF Core configurations to feature folders for better vertical slice architectureOct 2, 2025
CopilotAI requested a review fromnadirbadOctober 2, 2025 13:51
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nadirbadnadirbadAwaiting requested review from nadirbad

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Why did you choose to seperate the Infra - Configurations?

2 participants

@nadirbad

[8]ページ先頭

©2009-2025 Movatter.jp