Class TableFluent
Inheritance
System.Object
TableFluent
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
Constructors
| Improve this Doc View SourceTableFluent(Type, TableAttribute)
Declaration
public TableFluent(Type entityType, TableAttribute table)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | entityType | |
| TableAttribute | table |
Methods
| Improve this Doc View SourceDisableSyncStructure(Boolean)
禁用 CodeFirst 同步结构迁移
Declaration
public TableFluent DisableSyncStructure(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | value |
Returns
| Type | Description |
|---|---|
| TableFluent |
Index(String, String, Boolean)
设置实体的索引
Declaration
public TableFluent 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 |
IndexRemove(String)
Declaration
public TableFluent IndexRemove(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name |
Returns
| Type | Description |
|---|---|
| TableFluent |
Name(String)
数据库表名
Declaration
public TableFluent Name(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| TableFluent |
Navigate(String, String, String)
Declaration
public TableFluent Navigate(string proto, string bind, string tempPrimary)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | proto | |
| System.String | bind | |
| System.String | tempPrimary |
Returns
| Type | Description |
|---|---|
| TableFluent |
Navigate(String, String, Type)
导航关系Fluent,与 NavigateAttribute 对应
Declaration
public TableFluent 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 |
OldName(String)
指定数据库旧的表名,修改实体命名时,同时设置此参数为修改之前的值,CodeFirst才可以正确修改数据库表;否则将视为【创建新表】
Declaration
public TableFluent OldName(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| TableFluent |
Property(String)
Declaration
public ColumnFluent Property(string proto)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | proto |
Returns
| Type | Description |
|---|---|
| ColumnFluent |