Search Results for

    Show / Hide Table of Contents
    View Source

    Interface ICreateBuilder

    Builds a Create expression.

    Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Create
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public interface ICreateBuilder : IFluentBuilder

    Methods

    View Source

    Column(string)

    Begins building an expression to create a new column in a database table.

    Declaration
    ICreateColumnOnTableBuilder Column(string columnName)
    Parameters
    Type Name Description
    string columnName

    The name of the column to create.

    Returns
    Type Description
    ICreateColumnOnTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateColumnOnTableBuilder to continue building the column definition on the table.

    View Source

    Constraint(string)

    Begins building a CREATE CONSTRAINT expression for the specified constraint name.

    Declaration
    ICreateConstraintOnTableBuilder Constraint(string constraintName)
    Parameters
    Type Name Description
    string constraintName

    The name of the constraint to create.

    Returns
    Type Description
    ICreateConstraintOnTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateConstraintOnTableBuilder that can be used to further define the constraint.

    View Source

    ForeignKey()

    Begins building a 'Create Foreign Key' expression for a database migration.

    Declaration
    ICreateForeignKeyFromTableBuilder ForeignKey()
    Returns
    Type Description
    ICreateForeignKeyFromTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateForeignKeyFromTableBuilder that allows further configuration of the foreign key.

    View Source

    ForeignKey(string)

    Begins building a 'Create Foreign Key' expression for a database migration with the specified foreign key name.

    Declaration
    ICreateForeignKeyFromTableBuilder ForeignKey(string foreignKeyName)
    Parameters
    Type Name Description
    string foreignKeyName

    The name of the foreign key to create.

    Returns
    Type Description
    ICreateForeignKeyFromTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateForeignKeyFromTableBuilder that allows further configuration of the foreign key.

    View Source

    Index()

    Creates and returns a builder for constructing a Create Index expression.

    Declaration
    ICreateIndexForTableBuilder Index()
    Returns
    Type Description
    ICreateIndexForTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateIndexForTableBuilder used to further define the index creation.

    View Source

    Index(string)

    Creates and returns a builder for constructing a Create Index expression with the specified name.

    Declaration
    ICreateIndexForTableBuilder Index(string indexName)
    Parameters
    Type Name Description
    string indexName

    The name of the index to create.

    Returns
    Type Description
    ICreateIndexForTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateIndexForTableBuilder used to further define the index creation.

    View Source

    KeysAndIndexes(Type)

    Builds and executes an expression to create keys and indexes for the specified DTO type.

    Declaration
    IExecutableBuilder KeysAndIndexes(Type typeOfDto)
    Parameters
    Type Name Description
    Type typeOfDto

    The System.Type of the DTO for which to create keys and indexes.

    Returns
    Type Description
    IExecutableBuilder

    An IExecutableBuilder to execute the create keys and indexes expression.

    View Source

    KeysAndIndexes<TDto>()

    Builds a Create Keys and Indexes expression, and executes.

    Declaration
    IExecutableBuilder KeysAndIndexes<TDto>()
    Returns
    Type Description
    IExecutableBuilder
    Type Parameters
    Name Description
    TDto
    View Source

    PrimaryKey()

    Builds a Create Primary Key expression.

    Declaration
    ICreateConstraintOnTableBuilder PrimaryKey()
    Returns
    Type Description
    ICreateConstraintOnTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateConstraintOnTableBuilder to further define the primary key constraint.

    View Source

    PrimaryKey(bool)

    Builds a create primary key expression with the option to specify whether it is clustered.

    Declaration
    ICreateConstraintOnTableBuilder PrimaryKey(bool clustered)
    Parameters
    Type Name Description
    bool clustered

    Indicates whether the primary key should be clustered.

    Returns
    Type Description
    ICreateConstraintOnTableBuilder

    An ICreateConstraintOnTableBuilder to further define the primary key constraint.

    View Source

    PrimaryKey(string)

    Begins building an expression to create a primary key constraint with the specified name.

    Declaration
    ICreateConstraintOnTableBuilder PrimaryKey(string primaryKeyName)
    Parameters
    Type Name Description
    string primaryKeyName

    The name of the primary key constraint to create.

    Returns
    Type Description
    ICreateConstraintOnTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateConstraintOnTableBuilder for further configuration of the primary key constraint.

    View Source

    PrimaryKey(string, bool)

    Builds a Create Primary Key expression.

    Declaration
    ICreateConstraintOnTableBuilder PrimaryKey(string primaryKeyName, bool clustered)
    Parameters
    Type Name Description
    string primaryKeyName
    bool clustered
    Returns
    Type Description
    ICreateConstraintOnTableBuilder
    View Source

    Table(string)

    Begins building a CREATE TABLE expression for the specified table.

    Declaration
    ICreateTableWithColumnBuilder Table(string tableName)
    Parameters
    Type Name Description
    string tableName

    The name of the table to create.

    Returns
    Type Description
    ICreateTableWithColumnBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateTableWithColumnBuilder to define columns for the new table.

    View Source

    Table<TDto>(bool)

    Builds a builder for a Create Table expression for the specified DTO type.

    Declaration
    IExecutableBuilder Table<TDto>(bool withoutKeysAndIndexes = false)
    Parameters
    Type Name Description
    bool withoutKeysAndIndexes

    If true, creates the table without keys and indexes.

    Returns
    Type Description
    IExecutableBuilder

    An IExecutableBuilder to execute the create table expression.

    Type Parameters
    Name Description
    TDto

    The type representing the table schema.

    View Source

    UniqueConstraint()

    Builds a Create Unique Constraint expression.

    Declaration
    ICreateConstraintOnTableBuilder UniqueConstraint()
    Returns
    Type Description
    ICreateConstraintOnTableBuilder

    An Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ICreateConstraintOnTableBuilder to further define the unique constraint.

    View Source

    UniqueConstraint(string)

    Begins building an expression to create a unique constraint in the database schema.

    Declaration
    ICreateConstraintOnTableBuilder UniqueConstraint(string constraintName)
    Parameters
    Type Name Description
    string constraintName

    The name of the unique constraint to create.

    Returns
    Type Description
    ICreateConstraintOnTableBuilder

    An ICreateConstraintOnTableBuilder that can be used to further define the unique constraint, such as specifying the table and columns.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX