public bool UpdateFaceTask(FaceTask mFaceTask) { var filter = Builders <FaceTask> .Filter.Eq(s => s.Id, mFaceTask.Id); mFaceTaskCollection.ReplaceOne(filter, mFaceTask); return(true); }
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); }
public bool AddFaceTask(FaceTask mFaceTask) { mFaceTaskCollection.InsertOne(mFaceTask); return(true); }