示例#1
0
 public void AddChangeLog(ChangeLog changeLog)
 {
     using (var dataContext = new TVItemsDataContext(_connectionString))
     {
         dataContext.ChangeLogs.InsertOnSubmit(changeLog);
         dataContext.SubmitChanges();
     }
 }
示例#2
0
 public void AddItem(TVItem item)
 {
     using (var dataContext = new TVItemsDataContext(_connectionString))
     {
         dataContext.TVItems.InsertOnSubmit(item);
         dataContext.SubmitChanges();
     }
 }
示例#3
0
 public void Update(TVItem item)
 {
     using (var dataContext = new TVItemsDataContext(_connectionString))
     {
         dataContext.TVItems.Attach(item);
         dataContext.Refresh(RefreshMode.KeepCurrentValues, item);
         dataContext.SubmitChanges();
     }
 }