public void ShouldGetAllTrails() { using (TrailsContext context = new TrailsContext()) { DbSet<Trail> trails = context.Set<Trail>(); // or use context.Trails; trails.Load(); Assert.IsTrue(trails.Local.Count > 0); Console.WriteLine("There are {0} trails", trails.Count()); } }
public void ShouldGetAllPersons() { using (TrailsContext context = new TrailsContext()) { DbSet<Person> persons = context.Set<Person>(); // or use context.Persons; persons.Load(); Assert.IsTrue(persons.Local.Count > 0); Console.WriteLine("There are {0} persons", persons.Count()); } }