Пример #1
0
 internal void removeWaitRecognizerWithTID(WaitRecognizer nr)
 {
     using (var context = new DataContext(GetSqlConnection()))
     {
         var table = context.GetTable <WaitRecognizer>();
         table.Where(data =>
                     data.TID == nr.TID)
         .ToList()
         .ForEach(data => table.DeleteOnSubmit(data));
         context.SubmitChanges();
     }
 }
Пример #2
0
 public void addWaitRecognizer(WaitRecognizer ul)
 {
     try
     {
         using (var context = new DataContext(GetSqlConnection()))
         {
             var table = context.GetTable <WaitRecognizer>();
             table.InsertOnSubmit(ul);
             context.SubmitChanges();
         }
     }
     catch (Exception)
     {
         // Console.WriteLine(e.Message);
     }
 }