Esempio n. 1
0
        public bool UpdateFaceLibRes(FaceLibraryResource faceLibRes)
        {
            var filter = Builders <FaceLibraryResource> .Filter.Eq(s => s.Id, faceLibRes.Id);

            mFaceLibraryCollection.ReplaceOne(filter, faceLibRes);
            return(true);
        }
Esempio n. 2
0
        public bool DeleteFaceLibRes(FaceLibraryResource faceLibRes)
        {
            bool ret     = false;
            var  builder = Builders <FaceLibraryResource> .Filter;
            var  filter  = builder.Eq("_id", faceLibRes.Id);

            mFaceLibraryCollection.DeleteOne(filter);
            return(true);
        }
Esempio n. 3
0
 public bool AddFaceLibRes(FaceLibraryResource faceLibRes)
 {
     mFaceLibraryCollection.InsertOne(faceLibRes);
     return(true);
 }