Esempio n. 1
0
 /// <summary>
 /// Dispose with disposing flag
 /// </summary>
 /// <param name="disposing">Disposing flag</param>
 protected virtual void Dispose(bool disposing)
 {
     if (!disposing)
     {
         return;
     }
     if (OpfcDbContext != null)
     {
         OpfcDbContext.Dispose();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Save pending changes to the data store.
 /// </summary>
 public void Commit()
 {
     try
     {
         OpfcDbContext.SaveChanges();
     }
     catch (Exception ex)
     {
         Rollback();
         throw ex;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Create new OpfcDbContext
 /// </summary>
 protected void CreateDbContext()
 {
     OpfcDbContext = new OpfcDbContext();
 }