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(); } }
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); } }