26 lines
677 B
Markdown
26 lines
677 B
Markdown
# Migrating from MediatR
|
|
|
|
Migrate from MediatR to Svrnty.CQRS.
|
|
|
|
## Key Differences
|
|
|
|
| MediatR | Svrnty.CQRS |
|
|
|---------|-------------|
|
|
| `IRequest<T>` | `ICommandHandler<TCommand, TResult>` |
|
|
| `IRequestHandler<T, TResult>` | `ICommandHandler<T, TResult>` |
|
|
| Assembly scanning | Explicit registration |
|
|
| Manual controllers | Automatic endpoints |
|
|
|
|
## Migration Steps
|
|
|
|
1. Replace `IRequest<T>` with command/query classes
|
|
2. Update handler interfaces
|
|
3. Change from `Handle` to `HandleAsync`
|
|
4. Update service registration
|
|
5. Remove controllers (use automatic endpoints)
|
|
|
|
## See Also
|
|
|
|
- [Migration Guides Overview](README.md)
|
|
- [Getting Started](../getting-started/README.md)
|