Search Results for

    Show / Hide Table of Contents

    Class TableFluent<T>

    Inheritance
    System.Object
    TableFluent<T>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FreeSql.DataAnnotations
    Assembly: FreeSql.dll
    Syntax
    public class TableFluent<T>
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    TableFluent(TableAttribute)

    Declaration
    public TableFluent(TableAttribute table)
    Parameters
    Type Name Description
    TableAttribute table

    Methods

    | Improve this Doc View Source

    DisableSyncStructure(Boolean)

    禁用 CodeFirst 同步结构迁移

    Declaration
    public TableFluent<T> DisableSyncStructure(bool value)
    Parameters
    Type Name Description
    System.Boolean value
    Returns
    Type Description
    TableFluent<T>
    | Improve this Doc View Source

    Index(String, String, Boolean)

    设置实体的索引

    Declaration
    public TableFluent<T> Index(string name, string fields, bool isUnique = false)
    Parameters
    Type Name Description
    System.String name

    索引名

    System.String fields

    索引字段,为属性名以逗号分隔,如:Create_time ASC, Title ASC

    System.Boolean isUnique

    是否唯一

    Returns
    Type Description
    TableFluent<T>
    | Improve this Doc View Source

    IndexRemove(String)

    Declaration
    public TableFluent<T> IndexRemove(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    TableFluent<T>
    | Improve this Doc View Source

    Name(String)

    数据库表名

    Declaration
    public TableFluent<T> Name(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    TableFluent<T>
    | Improve this Doc View Source

    Navigate(String, String, String)

    Declaration
    public TableFluent<T> Navigate(string proto, string bind, string tempPrimary)
    Parameters
    Type Name Description
    System.String proto
    System.String bind
    System.String tempPrimary
    Returns
    Type Description
    TableFluent<T>
    | Improve this Doc View Source

    Navigate(String, String, Type)

    Declaration
    public TableFluent<T> Navigate(string proto, string bind, Type manyToMany = null)
    Parameters
    Type Name Description
    System.String proto
    System.String bind
    System.Type manyToMany
    Returns
    Type Description
    TableFluent<T>
    | Improve this Doc View Source

    Navigate<TProto>(Expression<Func<T, TProto>>, String, String)

    Declaration
    public TableFluent<T> Navigate<TProto>(Expression<Func<T, TProto>> proto, string bind, string tempPrimary)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<T, TProto>> proto
    System.String bind
    System.String tempPrimary
    Returns
    Type Description
    TableFluent<T>
    Type Parameters
    Name Description
    TProto
    | Improve this Doc View Source

    Navigate<TProto>(Expression<Func<T, TProto>>, String, Type)

    导航关系Fluent,与 NavigateAttribute 对应

    Declaration
    public TableFluent<T> Navigate<TProto>(Expression<Func<T, TProto>> proto, string bind, Type manyToMany = null)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<T, TProto>> proto
    System.String bind
    System.Type manyToMany

    多对多关系的中间实体类型

    Returns
    Type Description
    TableFluent<T>
    Type Parameters
    Name Description
    TProto
    | Improve this Doc View Source

    OldName(String)

    指定数据库旧的表名,修改实体命名时,同时设置此参数为修改之前的值,CodeFirst才可以正确修改数据库表;否则将视为【创建新表】

    Declaration
    public TableFluent<T> OldName(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    TableFluent<T>
    | Improve this Doc View Source

    Property(String)

    Declaration
    public ColumnFluent Property(string proto)
    Parameters
    Type Name Description
    System.String proto
    Returns
    Type Description
    ColumnFluent
    | Improve this Doc View Source

    Property<TProto>(Expression<Func<T, TProto>>)

    Declaration
    public ColumnFluent Property<TProto>(Expression<Func<T, TProto>> column)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<T, TProto>> column
    Returns
    Type Description
    ColumnFluent
    Type Parameters
    Name Description
    TProto
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX