I have an ASP.NET Core solution with multiple projects for API, Services, Data etc. Now I want to add a SignalR hub to my solution. For generating the payload before sending messages to clients, I want to have a service. But I can't create it in the Services project as the API project depends on it and SignalR is in the API project. I'd like to know what would be the best approach to achieve this. Alternate design ideas will be appreciated too.
I'm pretty sure you can define your hub in a class library so it's not in your API project.
Alternatively