void ForumService_Created(object sender, ForumEventArgs e) { var content = ApplicationContext.Current.Services.ContentService.GetById(e.Forum.ParentId); if (content.ContentType.Alias == "Project") { var owner = content.GetValue<int>("owner"); //NotificationsWeb.BusinessLogic.Forum.Subscribe(e.Forum.Id, owner); var ns = new NotificationService(ApplicationContext.Current.DatabaseContext); ns.SubscribeToForum(e.Forum.Id, owner); } }
void ForumService_Deleted(object sender, ForumEventArgs e) { var ns = new NotificationService(ApplicationContext.Current.DatabaseContext); ns.RemoveAllForumSubscriptions(e.Forum.Id); }