mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-02-27 16:50:33 +08:00
update navigat query
This commit is contained in:
@@ -220,6 +220,12 @@ namespace SqlSugar
|
|||||||
EntityColumnInfo column = new EntityColumnInfo();
|
EntityColumnInfo column = new EntityColumnInfo();
|
||||||
//var isVirtual = property.GetGetMethod().IsVirtual;
|
//var isVirtual = property.GetGetMethod().IsVirtual;
|
||||||
//if (isVirtual) continue;
|
//if (isVirtual) continue;
|
||||||
|
var navigat=property.GetCustomAttribute(typeof(Navigat));
|
||||||
|
if (navigat != null)
|
||||||
|
{
|
||||||
|
column.IsIgnore = true;
|
||||||
|
column.Navigat = navigat as Navigat;
|
||||||
|
}
|
||||||
var sugarColumn = property.GetCustomAttributes(typeof(SugarColumn), true)
|
var sugarColumn = property.GetCustomAttributes(typeof(SugarColumn), true)
|
||||||
.Where(it => it is SugarColumn)
|
.Where(it => it is SugarColumn)
|
||||||
.Select(it => (SugarColumn)it)
|
.Select(it => (SugarColumn)it)
|
||||||
|
|||||||
@@ -36,5 +36,6 @@ namespace SqlSugar
|
|||||||
public string[] UIndexGroupNameList { get; set; }
|
public string[] UIndexGroupNameList { get; set; }
|
||||||
public bool IsArray { get; set; }
|
public bool IsArray { get; set; }
|
||||||
public Type UnderType { get; set; }
|
public Type UnderType { get; set; }
|
||||||
|
public Navigat Navigat { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,19 +206,19 @@ namespace SqlSugar
|
|||||||
[AttributeUsage(AttributeTargets.Property, Inherited = true)]
|
[AttributeUsage(AttributeTargets.Property, Inherited = true)]
|
||||||
public class Navigat: Attribute
|
public class Navigat: Attribute
|
||||||
{
|
{
|
||||||
public string name { get; set; }
|
public string Name { get; set; }
|
||||||
public Type mappingType { get; set; }
|
public Type MappingType { get; set; }
|
||||||
public string aId { get; set; }
|
public string MappingAId { get; set; }
|
||||||
public string bId { get; set; }
|
public string MappingBId { get; set; }
|
||||||
public Navigat(string name)
|
public Navigat(string name)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.Name = name;
|
||||||
}
|
}
|
||||||
public Navigat(Type abType,string aId,string bId)
|
public Navigat(Type abType,string aId,string bId)
|
||||||
{
|
{
|
||||||
this.mappingType = mappingType;
|
this.MappingType = abType;
|
||||||
this.aId = aId;
|
this.MappingAId = aId;
|
||||||
this.bId= bId;
|
this.MappingBId = bId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user