OurUmbraco.NotificationsWeb.Services.NotificationService.RemoveAllForumSubscriptions C# (CSharp) Méthode

RemoveAllForumSubscriptions() public méthode

public RemoveAllForumSubscriptions ( int forumId ) : void
forumId int
Résultat void
        public void RemoveAllForumSubscriptions(int forumId)
        {
            _databaseContext.Database.Delete<ForumSubscriber>(
                "Where forumId=@0",
                forumId);
        }

Usage Example

Exemple #1
0
 void ForumService_Deleted(object sender, ForumEventArgs e)
 {
     var ns = new NotificationService(ApplicationContext.Current.DatabaseContext);
     ns.RemoveAllForumSubscriptions(e.Forum.Id);
 }