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