Пример #1
0
        public bool UpdateFaceTask(FaceTask mFaceTask)
        {
            var filter = Builders <FaceTask> .Filter.Eq(s => s.Id, mFaceTask.Id);

            mFaceTaskCollection.ReplaceOne(filter, mFaceTask);
            return(true);
        }
Пример #2
0
        public bool DeleteFaceTask(FaceTask mFaceTask)
        {
            bool ret     = false;
            var  builder = Builders <FaceTask> .Filter;
            var  filter  = builder.Eq("_id", mFaceTask.Id);

            mFaceTaskCollection.DeleteOne(filter);
            return(true);
        }
Пример #3
0
 public bool AddFaceTask(FaceTask mFaceTask)
 {
     mFaceTaskCollection.InsertOne(mFaceTask);
     return(true);
 }