public CommandStatus QueryModeratingStatus(ICommandContext context, int?messageId) { return (QueryMessageCommandStatus(context, messageId) .DisabledIfNot( () => { var id = ForumCommandHelper.GetMessageId(context, messageId); using (var mgr = context.CreateDBContext()) return mgr.Moderatorials().Any(m => m.MessageID == id); })); }
public CommandStatus QueryModeratingStatus(ICommandContext context, int? messageId) { return QueryMessageCommandStatus(context, messageId) .DisabledIfNot( () => { var id = ForumCommandHelper.GetMessageId(context, messageId); using (var mgr = context.CreateDBContext()) return mgr.Moderatorials().Any(m => m.MessageID == id); }); }