Hi, I've read this document [http://www.aspnetboilerplate.com/Pages/Documents/Notification-System#subscribe-to-notifications]). But I still don't know where to put subscription code into.
Let's say I want to notify every 'FailedLoginAttempt' to Admin User, and I've written a service to subscribe admin user to it.
Where should I inject this service?
And I've also noticed once subscribed, the subscriptions are saved into database. So I'm guessing it should be subscribed in the creation moment of admin user. Any advice is appreciated.
2 Answer(s)
-
0
Hi,
Subscription can be done in two ways.
- If you want to force user to subscribe, you can do in in an app service where you create the user.
- You can make a sucbscription page, users can select which notifications to subscribe. In this way, create a app service for example NotificationAppService and add a method to subscribe current user to selected notifications.
There might be some other cases according to your bussiness logic.
Thanks.
-
0
<cite>ismcagdas: </cite> Subscription can be done in two ways.
I've learned that option 2 is Module Zero's approach. Option 1 is what I'm looking for.
Thanks for your help.