LocalDbAliases.

LocalDbCreateInstance(ICakeContext, string, LocalDbVersion) Method

Summary

Creates a server instance and starts the server.
Assembly
Cake.SqlServer.dll
Namespace
Cake.SqlServer
Containing Type
LocalDbAliases

Syntax

public static void LocalDbCreateInstance(this ICakeContext context, string instanceName, LocalDbVersion version)

Examples

    #addin "nuget:?package=Cake.SqlServer"

    Task("Create-LocalDB")
         .Does(() =>
         {
            LocalDbCreateInstance("Cake-Test", LocalDbVersion.V11);
        });

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext Cake context
instanceName string Name of the instance to create
version LocalDbVersion Version number of LocalDB to use V11 or V12. The specified version must be installed on the computer. If not specified, the version number defaults to the version of the SqlLocalDB utility

Return Value

Type Description
void