Пример #1
0
        private static void Main(string[] args)
        {
            using (var repo = new BaseRepository<SampleEntity>())
            {
                // Adding //
                repo.AddAllAsync(new[]
                {
                    new SampleEntity { Name = "Turtle" },
                    new SampleEntity { Name = "Fox" },
                    new SampleEntity { Name = "Cat" },
                    new SampleEntity { Name = "Ant" },
                    new SampleEntity { Name = "Lion" },
                }).GetAwaiter().GetResult();

                Console.WriteLine("# of records : {0}\n", repo.Count());

                MainAsync(repo).GetAwaiter().GetResult();

                Console.ReadKey();
            }
        }