UserNotificationSubscriptionViewComponent.cs 670 B

1234567891011121314151617181920212223
  1. using Microsoft.AspNetCore.Mvc;
  2. using VberAdmin.BaseSystem.Notifications;
  3. namespace VberAdmin.Web.Views.Shared.Components.UserNotificationSubscription;
  4. public class UserNotificationSubscriptionViewComponent : VberAdminViewComponent
  5. {
  6. private readonly INotificationAppService _notificationAppService;
  7. public UserNotificationSubscriptionViewComponent(
  8. INotificationAppService notificationAppService)
  9. {
  10. _notificationAppService = notificationAppService;
  11. }
  12. public async Task<IViewComponentResult> InvokeAsync()
  13. {
  14. var model = await _notificationAppService.GetNotificationSettings();
  15. return View(model);
  16. }
  17. }