public void InsertUniversities()
        {
            dataContext.ExecuteCommand("DELETE FROM University");

            University yale = new University();

            yale.Name = "Yale";
            dataContext.Universities.InsertOnSubmit(yale);

            University bejingTech = new University();

            bejingTech.Name = "Bejing Tech";
            dataContext.Universities.InsertOnSubmit(bejingTech);


            dataContext.SubmitChanges();

            mainDataGrid.ItemsSource = dataContext.Universities;
        }
Example #2
0
 partial void DeleteUniversity(University instance);
Example #3
0
 partial void UpdateUniversity(University instance);
Example #4
0
 partial void InsertUniversity(University instance);