Table of Contents

Method CheckExists

Namespace
YndigoBlue.Velocity.Engine
Assembly
YndigoBlue.Velocity.dll

CheckExists(string)

Checks whether a schema exists in the database.

public bool CheckExists(string schemaName)

Parameters

schemaName string

The name of the schema to check.

Returns

bool

True if the schema exists; false otherwise.

Examples

using (var m = new Manager(conn))
{
    if (m.CheckExists("app"))
    {
        Console.WriteLine("Schema 'app' exists");
    }
    else
    {
        Console.WriteLine("Schema 'app' does not exist");
        var schema = new Schema("app");
        m.CreateSchema(schema);
    }
}

Exceptions

DbException

Thrown when a database error occurs.