mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-24 19:52:51 +08:00
46 lines
2.1 KiB
C#
46 lines
2.1 KiB
C#
using System;
|
||
using System.Linq;
|
||
|
||
namespace FreeSql.DataAnnotations
|
||
{
|
||
|
||
/// <summary>
|
||
/// OneToOne:[Navigate(nameof(Primary))] <-> (缺省)外表.Primary<para></para>
|
||
/// ManyToOne:Topic.cs 文件 [Navigate(nameof(Topic.CategoryId))] <-> (缺省)Category.Id<para></para>
|
||
/// _________________public Category Category { get; set; }<para></para>
|
||
/// OneToMany:Category.cs 文件 (缺省)Category.Id <-> [Navigate(nameof(Topic.CategoryId))]<para></para>
|
||
/// _________________public List<Topic> Topics { get; set; }<para></para>
|
||
/// </summary>
|
||
public class NavigateAttribute : Attribute
|
||
{
|
||
|
||
/// <summary>
|
||
/// OneToOne:[Navigate(nameof(Primary))] <-> (缺省)外表.Primary<para></para>
|
||
/// ManyToOne:Topic.cs 文件 [Navigate(nameof(Topic.CategoryId))] <-> (缺省)Category.Id<para></para>
|
||
/// _________________public Category Category { get; set; }<para></para>
|
||
/// OneToMany:Category.cs 文件 (缺省)Category.Id <-> [Navigate(nameof(Topic.CategoryId))]<para></para>
|
||
/// _________________public List<Topic> Topics { get; set; }<para></para>
|
||
/// </summary>
|
||
public string Bind { get; set; }
|
||
/// <summary>
|
||
/// 手工绑定 ManyToMany 导航关系
|
||
/// </summary>
|
||
public Type ManyToMany { get; set; }
|
||
|
||
/// <summary>
|
||
/// OneToOne:[Navigate(nameof(Primary))] <-> (缺省)外表.Primary<para></para>
|
||
/// ManyToOne:Topic.cs 文件 [Navigate(nameof(Topic.CategoryId))] <-> (缺省)Category.Id<para></para>
|
||
/// _________________public Category Category { get; set; }<para></para>
|
||
/// OneToMany:Category.cs 文件 (缺省)Category.Id <-> [Navigate(nameof(Topic.CategoryId))]<para></para>
|
||
/// _________________public List<Topic> Topics { get; set; }<para></para>
|
||
/// </summary>
|
||
public NavigateAttribute(string bind)
|
||
{
|
||
this.Bind = bind;
|
||
}
|
||
public NavigateAttribute()
|
||
{
|
||
}
|
||
}
|
||
}
|