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;
        }
示例#2
0
 partial void DeleteUniversity(University instance);
示例#3
0
 partial void UpdateUniversity(University instance);
示例#4
0
 partial void InsertUniversity(University instance);