docs: Clarify migration steps from MediatR in README#2
docs: Clarify migration steps from MediatR in README#2sipronunciaaigor wants to merge 2 commits intomasterfrom
Conversation
Updated README to provide clearer migration instructions from MediatR to BareMediator. Added explicit before/after code snippets for imports and service registration. Emphasized compatibility with existing MediatR interfaces and removed redundant or unclear guidance.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
There was a problem hiding this comment.
Pull request overview
This PR updates the README migration guide from MediatR to BareMediator with restructured instructions and explicit code examples. The changes reorganize the migration steps to separate Program.cs changes from other file changes and consolidate the before/after comparisons into clearer code blocks.
Key Changes
- Restructured migration section to show Program.cs changes first with both import and service registration changes in one code block
- Added a separate section for "Everywhere else" namespace replacements
- Removed redundant instruction text ("Everywhere simply replace" and "In your
Program.csreplace also")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // After | ||
| using BareMediator; | ||
| ``` | ||
| using BareMediator.Abstracions; |
There was a problem hiding this comment.
Typo: "Abstracions" should be "Abstractions" (missing 'c'). The correct namespace is BareMediator.Abstractions as used throughout the codebase.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
| using MediatR; | ||
|
|
||
| // After | ||
| using BareMediator.Abstracions; |
There was a problem hiding this comment.
Typo: "Abstracions" should be "Abstractions" (missing 'c'). The correct namespace is BareMediator.Abstractions as used throughout the codebase.
| // After | ||
| using BareMediator; | ||
| ``` | ||
| using BareMediator.Abstracions; |
There was a problem hiding this comment.
Incorrect namespace for Program.cs. The AddMediator extension method is in the BareMediator namespace, not BareMediator.Abstractions. To use services.AddMediator() as shown on line 184, you need "using BareMediator;" in Program.cs. The BareMediator.Abstractions namespace is needed for handler and request files where you use IRequest and IRequestHandler<T, TResponse>.
|
@sipronunciaaigor I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Description
Updated README to provide clearer migration instructions from MediatR to BareMediator. Added explicit before/after code snippets for imports and service registration. Emphasized compatibility with existing MediatR interfaces and removed redundant or unclear guidance.
Motivation and context
Previous instructions were not clear on the migration.
How has this been tested?
Checklist