private void DeletePeople(string name) { var persons = people.GetAll().Where(p => p.Name == name); foreach (var person in persons) { foreach (var measurement in measurements.GetAll().Where(m => m.Subject.Id == person.Id)) { measurements.Delete(measurement.Id); } people.Delete(person.Id); } }
public void GetAllSamples() { SetUp(); var e2 = new Experiment(20, "e2"); measurementDAO.Add(m1, e); measurementDAO.Add(m2, e); measurementDAO.Add(m3, e2); var ms = measurementDAO.GetAll(e); Assert.IsTrue(ms.Contains(m1) && ms.Contains(m2) && !ms.Contains(m3)); }