public void AddFaceTemplate(FaceTemplate template) { List <FaceTemplate> faceTemplates = this._faceCompreaSet.FaceTemplates; lock (faceTemplates) { this._faceCompreaSet.FaceTemplates.Add(template); } }
public void RemoveFaceTempate(string PersonId) { List <FaceTemplate> faceTemplates = this._faceCompreaSet.FaceTemplates; lock (faceTemplates) { FaceTemplate faceTemplate = this._faceCompreaSet.FaceTemplates.FirstOrDefault((FaceTemplate p) => p.PersonId.Equals(PersonId)); if (faceTemplate != null) { this._faceCompreaSet.FaceTemplates.Remove(faceTemplate); } } }