コード例 #1
0
        public static bool CommandOrIdExists(CommandInfoModel displayedCommand)
        {
            var filtercommand = Builders <CommandInfoModel> .Filter.Eq(x => x.Command, displayedCommand.Command);

            var filterid = Builders <CommandInfoModel> .Filter.Eq(x => x.Id, displayedCommand.Id);

            var filter = Builders <CommandInfoModel> .Filter.Or(filtercommand, filterid);

            return(Mongo.GetCount(filter) > 0);
        }
コード例 #2
0
 public static void DeleteOne(CommandInfoModel model) => Mongo.DeleteOne(model);
コード例 #3
0
 public static void UpdateOne(CommandInfoModel displayedGroup) => Mongo.UpdateOne(displayedGroup);
コード例 #4
0
 public static void InsertOne(CommandInfoModel model) => Mongo.InsertOne(model);