コード例 #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);
 }