mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
Internal optimization
This commit is contained in:
@ -3,11 +3,23 @@ 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>
|
||||
/// 手工绑定 OneToMany、ManyToOne 导航关系
|
||||
/// 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>
|
||||
@ -15,6 +27,13 @@ namespace FreeSql.DataAnnotations
|
||||
/// </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;
|
||||
|
Reference in New Issue
Block a user