Esempio n. 1
0
        public MainPage()
        {
            InitializeComponent();


            DBSample dBSample = new DBSample();


            var items = Task.Run <List <TodoItem> >(async() =>
            {
                return(await dBSample.Test());
            }).Result;

            itemsListView.ItemsSource = items;
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            DBSample dBSample = new DBSample();


            var items = Task.Run <List <TodoItem> >(async() =>
            {
                return(await dBSample.Test());
            }).Result;

            items.ForEach(Console.WriteLine);

            Console.WriteLine("Output is also in Debug window");
            Console.ReadKey();
        }