PeanutButter
Loading...
Searching...
No Matches
PeanutButter.TempDb.LocalDb.LocalDbFactory Class Reference

LocalDb implmentation if ILocalDbFactory. More...

Inheritance diagram for PeanutButter.TempDb.LocalDb.LocalDbFactory:
PeanutButter.TempDb.LocalDb.ILocalDbFactory

Public Member Functions

 LocalDbFactory ()
 Default constructor for a LocalDbFactory.
 LocalDbFactory (string instanceName)
 Constructor for a LocalDbFactory which takes an override InstanceName to attach to.
virtual void CreateDatabase (string databaseName, string databaseFile)
 Creates the LocalDb temporary database.
string GetMasterConnectionString ()
 Gets the connectionstring to the master database for the configured LocalDb instance, required to be able to create a new temporary LocalDb database.

Properties

string InstanceName [get, set]
 LocalDb instance, usually something like "v11.0".

Detailed Description

LocalDb implmentation if ILocalDbFactory.

Constructor & Destructor Documentation

◆ LocalDbFactory()

PeanutButter.TempDb.LocalDb.LocalDbFactory.LocalDbFactory ( string instanceName)

Constructor for a LocalDbFactory which takes an override InstanceName to attach to.

Parameters
instanceName

Member Function Documentation

◆ CreateDatabase()

virtual void PeanutButter.TempDb.LocalDb.LocalDbFactory.CreateDatabase ( string databaseName,
string databaseFile )
virtual

Creates the LocalDb temporary database.

Parameters
databaseNameName of the required database
databaseFileA temporary file path which may be used as backing for the new database

Implements PeanutButter.TempDb.LocalDb.ILocalDbFactory.

◆ GetMasterConnectionString()

string PeanutButter.TempDb.LocalDb.LocalDbFactory.GetMasterConnectionString ( )

Gets the connectionstring to the master database for the configured LocalDb instance, required to be able to create a new temporary LocalDb database.

Returns

The documentation for this class was generated from the following file:
  • source/TempDb/PeanutButter.TempDb.LocalDb/LocalDbFactory.cs