LightningDB.LightningTransaction.OpenDatabase C# (CSharp) Method

OpenDatabase() public method

Opens a database in context of this transaction.
public OpenDatabase ( string name = null, DatabaseConfiguration configuration = null ) : LightningDatabase
name string Database name (optional). If null then the default name is used.
configuration DatabaseConfiguration Database open options.
return LightningDatabase
        public LightningDatabase OpenDatabase(string name = null, DatabaseConfiguration configuration = null)
        {
            configuration = configuration ?? new DatabaseConfiguration();
            var db = new LightningDatabase(name, this, configuration);
            return db;
        }

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Gets a value by its key.
 /// </summary>
 /// <typeparam name="TKey">Key type.</typeparam>
 /// <param name="txn">Transaction.</param>
 /// <param name="key">Key.</param>
 /// <returns>Value converter or null if not exists.</returns>
 public static GetByOperation GetBy <TKey>(this LightningTransaction txn, TKey key)
 {
     return(txn.GetBy(txn.OpenDatabase(), key));
 }
All Usage Examples Of LightningDB.LightningTransaction::OpenDatabase