Example #1
0
 public void Update(TM entity)
 {
     using (var dataCtx = new LinqToDB.DataContext(ProviderName, ConnectionString))
     {
         try
         {
             var pkValueRow = (from e in dataCtx.GetTable <TM>() where e.Id.Equals(entity.Id) select e).FirstOrDefault();
             dataCtx.Update(entity);
             dataCtx.BeginTransaction();
         }
         catch (Exception ex)
         {
             MessageBox.Show("Error occurred: " + ex.Message);
         }
     }
 }