public MainWindow() { InitializeComponent(); string connectionstring = ConfigurationManager.ConnectionStrings["studentDB.Properties.Settings.StudentDBConnectionString"].ConnectionString; StudentDataClasses1DataContext dataContext = new StudentDataClasses1DataContext(connectionstring); students = new StudentClass(dataContext); SelectUniversityList.ItemsSource = students.AllUniversity(); ShowAllStudentsList.ItemsSource = students.displayAllStudents(); SelectClassList.ItemsSource = students.AllClass(); }
/// <summary> /// Default constructor /// </summary> /// <param name="datcon"></param> public StudentClass(StudentDataClasses1DataContext datcon) => this.dataContext = datcon;