Ef6DatabaseUpdateExtensions Class

Summary

Extensions for Ef6DatabaseUpdateSettings.
Assembly
Cake.EntityFramework6.dll
Namespace
Cake.EntityFramework6.Database
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["Ef6DatabaseUpdateExtensions"] class Type type-node

Syntax

public static class Ef6DatabaseUpdateExtensions

Methods

Name Value Summary
ForceChanges(Ef6DatabaseUpdateSettings) Ef6DatabaseUpdateSettings
Specifies that data loss is acceptable during automatic migration of the database.
static
FromAssembly(Ef6DatabaseUpdateSettings, FilePath) Ef6DatabaseUpdateSettings
The assembly to use.
static
FromConfigurationFile(Ef6DatabaseUpdateSettings, FilePath) Ef6DatabaseUpdateSettings
Specifies the configuration file to use for named connection strings.
static
FromDataDirectory(Ef6DatabaseUpdateSettings, DirectoryPath) Ef6DatabaseUpdateSettings
The data directory
static
FromProjectDirectory(Ef6DatabaseUpdateSettings, DirectoryPath) Ef6DatabaseUpdateSettings
The project directory. Defaults to the current directory.
static
ScriptChanges(Ef6DatabaseUpdateSettings) Ef6DatabaseUpdateSettings
Generate a SQL script rather than executing the pending changes directly.
static
SetConnectionprovider(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
Specifies the connection string to use. If omitted, the context's default connection will be used.
static
SetConnectionString(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
Specifies the connection string to use. If omitted, the context's default connection will be used.
static
SetConnectionStringName(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
Specifies the name of a connection string to use from the application's configuration file.
static
SetLanguage(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
The language. Defaults to 'C#'.
static
SetMigrationsConfigurationType(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
Specifies the migrations configuration (TYPE) to use. If omitted, migrations will attempt to locate a single migrations configuration type in the target project.
static
SetRootNamespace(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
The root namespace. Defaults to the target assembly name.
static
WithSource(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
Specifies the name of a particular migration to use as the update's starting point. If omitted, the last applied migration in the database will be used.
static
WithTarget(Ef6DatabaseUpdateSettings, string) Ef6DatabaseUpdateSettings
Specifies the name of a particular migration to update the database to. If omitted, the current model will be used.
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin