public bool UpdateFaceLibRes(FaceLibraryResource faceLibRes) { var filter = Builders <FaceLibraryResource> .Filter.Eq(s => s.Id, faceLibRes.Id); mFaceLibraryCollection.ReplaceOne(filter, faceLibRes); return(true); }
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); }
public bool AddFaceLibRes(FaceLibraryResource faceLibRes) { mFaceLibraryCollection.InsertOne(faceLibRes); return(true); }