Пример #1
0
        private static void ShowTeamsWithMoreThenOneMember(DemoChannelProvider provider)
        {
            var teamsWithMoreThenOneMember = RemoteRepository
                                             .CreateQuery <Team>(provider)
                                             .Where(p => p.Developers.Count > 1);

            Console.WriteLine(
                $"Teams with more then one member {string.Join(",", teamsWithMoreThenOneMember.AsEnumerable().Select(t => t.Title))}");
        }
Пример #2
0
        private static void ShowDevelopers(DemoChannelProvider provider)
        {
            var teamsCount = RemoteRepository.CreateQuery <Team>(provider).Count();

            Console.WriteLine($"In db stored {teamsCount} teams");
            Console.WriteLine("-----------------------");

            ShowTeamsInfo(provider);
        }
Пример #3
0
        static void Main(string[] args)
        {
            try
            {
                var provider = new DemoChannelProvider();
                ShowDevelopers(provider);
                Console.WriteLine("Result: ok");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadKey();
        }
Пример #4
0
 private static void ShowTeamsInfo(DemoChannelProvider provider)
 {
     ShowTeamsWithMoreThenOneMember(provider);
 }