Пример #1
0
        static void InsertCat()
        {
            int         count;
            ICatService catService = new CatService();

            Console.WriteLine("На початку роботи котів: " + catService.Count());
            Console.WriteLine("Скільки котів додати в БД:");
            count = int.Parse(Console.ReadLine());
            catService.InsertCats(count);
            Console.WriteLine("У кінці роботи котів: " + catService.Count());
        }
Пример #2
0
        private void ShowMessage()
        {
            Dispatcher.Invoke(new Action(() =>
            {
                btnAddRange.IsEnabled = false;
            }));
            ICatService catService = new CatService();

            catService.EventInsertItem += UpdateUIAsync;
            catService.InsertCats(240, _mrse);
            Dispatcher.Invoke(new Action(() =>
            {
                btnAddRange.IsEnabled = true;
            }));
        }