コード例 #1
0
        private static async Task Run()
        {
            using (var context = new SpecialisedContext())
            {
                var repo = new ItemRepository(context);

                foreach (var x in await repo.GetAll())
                {
                    Console.WriteLine(x.Id + ": " + x.Name);
                }

                foreach (var x in await repo.GetSomethingElse())
                {
                    Console.WriteLine(x);
                }
            }
        }
コード例 #2
0
 public ItemRepository(SpecialisedContext context) : base(context)
 {
     _context = context;
 }