Search Results for

    Show / Hide Table of Contents

    Class PostgresEnum

    Represents the metadata for a PostgreSQL enum.

    Inheritance
    object
    PostgresEnum
    Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public class PostgresEnum

    Properties

    | Improve this Doc View Source

    Annotatable

    The Annotatable that stores the enum.

    Declaration
    public virtual Annotatable Annotatable { get; }
    Property Value
    Type Description
    Annotatable
    | Improve this Doc View Source

    Labels

    The enum labels.

    Declaration
    public virtual IReadOnlyList<string> Labels { get; set; }
    Property Value
    Type Description
    IReadOnlyList<><string>
    | Improve this Doc View Source

    Name

    The enum name.

    Declaration
    public virtual string Name { get; }
    Property Value
    Type Description
    string
    | Improve this Doc View Source

    Schema

    The enum schema or null to represent the default schema.

    Declaration
    public virtual string? Schema { get; }
    Property Value
    Type Description
    string?

    Methods

    | Improve this Doc View Source

    FindPostgresEnum(IReadOnlyAnnotatable, string?, string)

    Finds a PostgresEnum in the , or returns null if not found.

    Declaration
    public static PostgresEnum? FindPostgresEnum(IReadOnlyAnnotatable annotatable, string? schema, string name)
    Parameters
    Type Name Description
    IReadOnlyAnnotatable annotatable

    The annotatable to search for the enum.

    string? schema

    The enum schema or null to use the model's default schema.

    string name

    The enum name.

    Returns
    Type Description
    PostgresEnum

    The PostgresEnum from the .

    | Improve this Doc View Source

    GetOrAddPostgresEnum(IMutableAnnotatable, string?, string, string[])

    Gets or adds a PostgresEnum from or to the .

    Declaration
    public static PostgresEnum GetOrAddPostgresEnum(IMutableAnnotatable annotatable, string? schema, string name, string[] labels)
    Parameters
    Type Name Description
    IMutableAnnotatable annotatable

    The annotatable from which to get or add the enum.

    string? schema

    The enum schema or null to use the model's default schema.

    string name

    The enum name.

    string[] labels

    The enum labels.

    Returns
    Type Description
    PostgresEnum

    The PostgresEnum from the .

    | Improve this Doc View Source

    GetOrAddPostgresEnum(IMutableAnnotatable, string, string[])

    Gets or adds a PostgresEnum from or to the .

    Declaration
    public static PostgresEnum GetOrAddPostgresEnum(IMutableAnnotatable annotatable, string name, string[] labels)
    Parameters
    Type Name Description
    IMutableAnnotatable annotatable

    The annotatable from which to get or add the enum.

    string name

    The enum name.

    string[] labels

    The enum labels.

    Returns
    Type Description
    PostgresEnum

    The PostgresEnum from the .

    | Improve this Doc View Source

    GetPostgresEnums(IReadOnlyAnnotatable)

    Gets the collection of PostgresEnum stored in the .

    Declaration
    public static IEnumerable<PostgresEnum> GetPostgresEnums(IReadOnlyAnnotatable annotatable)
    Parameters
    Type Name Description
    IReadOnlyAnnotatable annotatable

    The annotatable to search for PostgresEnum annotations.

    Returns
    Type Description
    IEnumerable<><PostgresEnum>

    The collection of PostgresEnum stored in the .

    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team