Skip to content

Migrate to Mediato #63

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 17, 2025
Merged

Migrate to Mediato #63

merged 3 commits into from
May 17, 2025

Conversation

skrasekmichael
Copy link
Owner

@skrasekmichael skrasekmichael commented May 17, 2025

  • migrated from MediatR to Mediator (Migrate away from MediatR #60)
  • improved logging and debug logging
  • fixed some potential concurrency problems in testing
  • formatting changes

@skrasekmichael skrasekmichael requested a review from Copilot May 17, 2025 18:05
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the codebase from MediatR to Mediato, revising the messaging patterns and command invocations while also including logging improvements and test concurrency fixes.

  • Replaced MediatR with Mediato.Abstractions and updated endpoint dependencies from ISender to IRequestSender.
  • Updated all command invocations to use asynchronous SendAsync with proper generic type parameters.
  • Adjusted package dependencies in Directory.Packages.props for Mediato and related libraries.

Reviewed Changes

Copilot reviewed 94 out of 94 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/TeamUp.Api/Endpoints/Teams/UpdateTeamMemberRoleEndpoint.cs Updated MediatR dependency and command invocation.
src/TeamUp.Api/Endpoints/Teams/RemoveTeamMemberEndpoint.cs Updated DI and command call pattern.
src/TeamUp.Api/Endpoints/Teams/GetUserTeamsEndpoint.cs Updated query sending with IRequestSender.
src/TeamUp.Api/Endpoints/Teams/GetTeamEndpoint.cs Replaced synchronous Send with SendAsync and updated DI.
src/TeamUp.Api/Endpoints/Teams/DeleteTeamEndpoint.cs Updated command sending from MediatR to Mediato pattern.
src/TeamUp.Api/Endpoints/Teams/CreateTeamEndpoint.cs Updated dependency and command invocation.
src/TeamUp.Api/Endpoints/Teams/CreateEventTypeEndpoint.cs Updated command sending with new sender interface.
src/TeamUp.Api/Endpoints/Teams/ChangeOwnerShipEndpoint.cs Updated DI; note potential naming inconsistency with "Ownership".
src/TeamUp.Api/Endpoints/Teams/ChangeNicknameEndpoint.cs Updated dependency and asynchronous command call.
src/TeamUp.Api/Endpoints/Invitations/RemoveInvitationEndpoint.cs Updated DI and command invocation.
src/TeamUp.Api/Endpoints/Invitations/InviteUserEndpoint.cs Updated dependency and command call pattern.
src/TeamUp.Api/Endpoints/Invitations/GetTeamInvitationsEndpoint.cs Updated query sending with new interface.
src/TeamUp.Api/Endpoints/Invitations/GetMyInvitationsEndpoint.cs Updated endpoint dependency and asynchronous query sending.
src/TeamUp.Api/Endpoints/Invitations/AcceptInvitaionEndpoint.cs Updated dependency and asynchronous command sending; potential typo in file name.
src/TeamUp.Api/Endpoints/Events/UpsertEventReplyEndpoint.cs Updated DI and command invocation pattern.
src/TeamUp.Api/Endpoints/Events/RemoveEventEndpoint.cs Updated dependency and fixed command call with SendAsync.
src/TeamUp.Api/Endpoints/Events/GetEventsEndpoint.cs Updated asynchronous query sending with new sender.
src/TeamUp.Api/Endpoints/Events/GetEventEndpoint.cs Updated DI and query sending method.
src/TeamUp.Api/Endpoints/Events/CreateEventEndpoint.cs Updated dependency and asynchronous command invocation.
Directory.Packages.props Removed MediatR package and added Mediato and related RailwayResult packages.
Comments suppressed due to low confidence (2)

src/TeamUp.Api/Endpoints/Teams/ChangeOwnerShipEndpoint.cs:1

  • The file name 'ChangeOwnerShipEndpoint.cs' uses an inconsistent spelling compared to the command 'ChangeOwnershipCommand'. Consider renaming the file to 'ChangeOwnershipEndpoint.cs' for consistency.
using Mediato.Abstractions;

src/TeamUp.Api/Endpoints/Invitations/AcceptInvitaionEndpoint.cs:1

  • The file name 'AcceptInvitaionEndpoint.cs' appears to have a typo ('Invitaion' instead of 'Invitation'). Consider renaming it to 'AcceptInvitationEndpoint.cs'.
using Mediato.Abstractions;

@skrasekmichael skrasekmichael merged commit f7bc424 into main May 17, 2025
1 check passed
@skrasekmichael skrasekmichael deleted the migrate_from_mediatr branch May 17, 2025 18:13
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.

1 participant