C
C#2y ago
Nathan

❔ Using Mediator with seperate API Contracts project

Sup guys, I've finally decided to use Mediator, and now I have the following problem: 1. I have a API contracts project, which should not have any Nuget packages installed (it's just the API request / response models) 2. I want to, for example, send the request object via Mediator. But since the API contracts project does not have Mediator installed, I can't have them implement IRequest. 3. So my solution is as follows. Is this correct?
public record CreateAutomationCommand : IRequest<int>
{
public CreateAutomationRequest Request { get; set; }
}
public record CreateAutomationCommand : IRequest<int>
{
public CreateAutomationRequest Request { get; set; }
}
4 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Nathan
NathanOP2y ago
Yeah that's a preference, but that wasn't my question
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server