コード例 #1
0
        public ComboWindow()
        {
            InitializeComponent();

            //Data binding using EF
            var entity = new FinalReviewEntities();

            entity.Users.Load();
            uxComboBox.DataContext = entity.Users.Local;
        }
コード例 #2
0
        public override void EndInit()
        {
            base.EndInit();
            //Creates EF to take data from data base
            var fREntities = new FinalReviewEntities();

            //Load the data
            fREntities.Users.Load();
            //Bind the data to uxList
            uxList.ItemsSource = fREntities.Users.Local;
        }