Example #1
0
        private void OnReadButtonClicked(object sender, RoutedEventArgs e)
        {
            using (var dbContext = new DTDbContext())
            {
                foreach (var topic in dbContext.Topics)
                {
                    Debug.WriteLine(topic.Name);

                    if (topic.Questions == null)
                    {
                        continue;
                    }

                    foreach (var question in topic.Questions)
                    {
                        Debug.WriteLine(question.Text);
                    }
                }

                foreach (var question in dbContext.Questions)
                {
                    Debug.WriteLine(question.Text);
                    Debug.WriteLine(question.Topic.Name);
                }
            }
        }
Example #2
0
 public void Ctor()
 {
     var dbContext = new DTDbContext();
 }
Example #3
0
 public void Ctor()
 {
     var dbContext = new DTDbContext();
 }