public IList <Home> GetAllHomes() { using (var ctx = new AnimalsContext()) { return(ctx.Homes.Include(home => home.Cats).ToList()); } }
public IList <Cat> GetAllCats() { using (var ctx = new AnimalsContext()) { return(ctx.Cats.Include(cat => cat.Home).ToList()); } }