Exemplo 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();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Save pending changes to the data store.
 /// </summary>
 public void Commit()
 {
     try
     {
         OpfcDbContext.SaveChanges();
     }
     catch (Exception ex)
     {
         Rollback();
         throw ex;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create new OpfcDbContext
 /// </summary>
 protected void CreateDbContext()
 {
     OpfcDbContext = new OpfcDbContext();
 }