private void CreateSystem()
{
// Create the transaction
using (var transaction = Database.CreateSafeTransaction(IsolationLevel.Serializable)) {
try {
using (var session = new SystemSession(transaction, SystemSchema.Name)) {
using (var query = session.CreateQuery()) {
foreach (var feature in Database.System.Features) {
feature.OnSystemEvent(SystemEventType.TableCompositeCreate, query);
}
}
}
// Commit and close the transaction.
transaction.Commit();
} catch (TransactionException e) {
throw new InvalidOperationException("Transaction Exception creating composite.", e);
}
}
}