Ejemplo n.º 1
0
        public void BeerSampleContext_Tests()
        {
            var db    = new BeerSample();
            var beers = from b in db.Beers
                        select b;

            foreach (var beer in beers)
            {
                Console.WriteLine(beer.Name);
            }
        }
Ejemplo n.º 2
0
        public void BeerSample_Tests()
        {
            var db    = new BeerSample();
            var query = from beer in db.Beers
                        join brewery in db.Breweries
                        on beer.BreweryId equals N1Ql.Key(brewery)
                        select new { beer.Name, beer.Abv, BreweryName = brewery.Name };

            foreach (var beer in query)
            {
                Console.WriteLine(beer.Name);
            }
        }