public void TestSave() { Insert(); var list = dao.FindAll(); Assert.AreEqual(2, list.Count); var p1 = list[0]; Assert.AreEqual(1, p1.Id); Assert.AreEqual("foo", p1.Name); Clean(); }
public void TestSave() { Insert(); List <Person> personList = dao.FindAll(); Assert.AreEqual(2, personList.Count); Person p = personList[0]; Assert.AreEqual(1, p.Id); Assert.AreEqual("foo", p.Name); Assert.AreEqual(10, p.Age); Assert.AreEqual(100.0, p.Wage); Clean(); }
private static void FindAll() { List <Person> personList = dao.FindAll(); foreach (var person in personList) { Console.WriteLine(person); } }
public void FindAll() { var list = dao.FindAll(); foreach (var el in list) { Console.WriteLine(el); } }
private void PersonFindAll_Load(object sender, EventArgs e) { List <Person> all = dao.FindAll(); String res = "", nl = "\r\n"; foreach (var p in all) { res += p.ToString() + nl; } tbPerson.Text = res; }