Class NavigateAttribute
OneToOne:[Navigate(nameof(Primary))] <-> (缺省)外表.Primary
ManyToOne:Topic.cs 文件 [Navigate(nameof(Topic.CategoryId))] <-> (缺省)Category.Id
_________________public Category Category { get; set; }
OneToMany:Category.cs 文件 (缺省)Category.Id <-> [Navigate(nameof(Topic.CategoryId))]
_________________public List<Topic> Topics { get; set; }
Inheritance
Inherited Members
Namespace: FreeSql.DataAnnotations
Assembly: FreeSql.dll
Syntax
public class NavigateAttribute : Attribute
Constructors
| Improve this Doc View SourceNavigateAttribute()
Declaration
public NavigateAttribute()
NavigateAttribute(String)
OneToOne:[Navigate(nameof(Primary))] <-> (缺省)外表.Primary
ManyToOne:Topic.cs 文件 [Navigate(nameof(Topic.CategoryId))] <-> (缺省)Category.Id
_________________public Category Category { get; set; }
OneToMany:Category.cs 文件 (缺省)Category.Id <-> [Navigate(nameof(Topic.CategoryId))]
_________________public List<Topic> Topics { get; set; }
Declaration
public NavigateAttribute(string bind)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | bind |
Properties
| Improve this Doc View SourceBind
OneToOne:[Navigate(nameof(Primary))] <-> (缺省)外表.Primary
ManyToOne:Topic.cs 文件 [Navigate(nameof(Topic.CategoryId))] <-> (缺省)Category.Id
_________________public Category Category { get; set; }
OneToMany:Category.cs 文件 (缺省)Category.Id <-> [Navigate(nameof(Topic.CategoryId))]
_________________public List<Topic> Topics { get; set; }
Declaration
public string Bind { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ManyToMany
手工绑定 ManyToMany 导航关系
Declaration
public Type ManyToMany { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Type |
TempPrimary
与非主键进行关联,仅支持 OneToMany、ManyToOne
使用方法参考 Bind 属性
Declaration
public string TempPrimary { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |