Reputation: 160
I'm using the Asp.Net boilerplate template with ASP.Net Core 2.1.
I implemented a Hub in the Web.Core assembly and created a controller.
I can subcribe/notify data with my hub from any client, this is not my problem.
I'd like to use this Hub in the Application Services layer, but SignalR is not referenced by Application Services layer by default.
So my question is :
Is it a bad practice to reference SignalR in the the Application Services layer ?
Thanks in advance !
Regards, Pierre-Luc
Upvotes: 7
Views: 2180
Reputation: 2282
Directly depending a web feature is not a good practice in the application layer. Because, it is assumed presentation layer independent.
I think you have a few options;
So, as like any good answer, it depends :)
Upvotes: 6