I'm working on a live notification system using ASP .NET MVC with SignalR.
My app has three layers like this:
All my app methods are already built and working and I'm currently adding a notification system using SignalR.
The problem I'm facing is that I need to modify every method that might imply a notification sending to return an array of users to be notified, an array that might be empty (because notifications might be turned off for that operation).
SignalR hub is installed in the MVC layer so I can't call it from my Business Logic Layer (BAL). I know I can solve it in a clean way with SQL Dependencies, but that's not an option.
An example would be (pseudocode):
Controler.cs (Without notifications)
AddComent(Comment){
int error = BALComments.AddComment(Comment);
return View();
}
Controler.cs (With notificacions)
AddComent(Comment){
NotificationHub notifHub;
int error = BALComments.AddComment(Comment,UserArray);
notifHub(UserArray);
return View();
}
The question is how to modify every "notificable" method in my business logic layer without explicitly change every method to return an optional user array list.
I would like to say thank you for the amazing details and concepts you are sharing in this.The style of writing is excellent and also the content is top-notch.
RépondreSupprimerDot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery