public MainWindow() { InitializeComponent(); //import system.configuration from references string connectionstring = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.ZooConnectionString"].ConnectionString; dataContext = new LinqToSqlDataClassesDataContext(connectionstring); //InsertUniversities(); //InsertStudents(); //insertLectures(); //InsertStudentLectureAssociations(); //GetUniversityOfTOni(); //GetLectureOfTooni(); //GetAllStudentsFromYale(); //GetAllUniversitiesWithTransgenders(); //GetAllLecturesFromNeijingTech(); //UpdateToni(); DeleteJame(); }
public MainWindow() { InitializeComponent(); string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.CSharpTutorialConnectionString"].ConnectionString; dataContext = new LinqToSqlDataClassesDataContext(connectionString); //InsertStudents(); //InsertStudentLectureAssociations(); //GetStudentsWithMath(); //UpdateJohn(); DeleteMark(); }
public void DeleteJame() { Student Jame = dataContext.Students.FirstOrDefault(st => st.Name == "Jame"); dataContext.Students.DeleteOnSubmit(Jame); dataContext.SubmitChanges(); //MainDataGrid.ItemsSource = dataContext.Students; // bellow is in case you run into an error string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.FabioCsharpDBConnectionString"].ConnectionString; LinqToSqlDataClassesDataContext db = new LinqToSqlDataClassesDataContext(connectionString); MainDataGrid.ItemsSource = db.Students; }
public MainWindow() { InitializeComponent(); string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.CSMasterClassDBConnectionString"].ConnectionString; dataContext = new LinqToSqlDataClassesDataContext(connectionString); //InsertStudentLectureAssociations(); //GetUniversityOfTonie(); //GetLecturesFromTonie(); //GetAllStudentsFromYale(); //GetAllUniversitiesWithFemales(); //GetAllLecturesFromMIT(); //UpdateTonie(); //DeleteJames(); }
public MainWindow() { InitializeComponent(); string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.PeemasitDBConnectionString"].ConnectionString; dataContext = new LinqToSqlDataClassesDataContext(connectionString); //InsertUniversities(); //InsertStudent(); //InsertLecture(); //InsertStudentLectureAssociations(); //GetUniversityOfJohn(); //GetLectureFromJohn(); //GetAllStudentFromYale(); //GetAllUniversitiesWithTransgenders(); //GetAllLectureFromCambridge(); //UpdateJohn(); //DeleteJame(); }
public MainWindow() { InitializeComponent(); string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.PanjutorialsDB1ConnectionString"].ConnectionString; dataContext = new LinqToSqlDataClassesDataContext(connectionString); //InsertUniversities(); //InsertStudent(); //InsertLectures(); //InsertStudentLectureAssociations(); //GetUniversityOfToni(); //GetLecturesFromToni(); //GetAllStudentsFromYale(); //GetAllUniversitiesWithTransgenders(); //GetAllLecturesFromBeijingTech(); // UpdateToni(); DeleteJame(); }