mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-26 14:15:50 +08:00
update navigat query
This commit is contained in:
@@ -220,6 +220,12 @@ namespace SqlSugar
|
||||
EntityColumnInfo column = new EntityColumnInfo();
|
||||
//var isVirtual = property.GetGetMethod().IsVirtual;
|
||||
//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)
|
||||
.Where(it => it is SugarColumn)
|
||||
.Select(it => (SugarColumn)it)
|
||||
|
||||
@@ -36,5 +36,6 @@ namespace SqlSugar
|
||||
public string[] UIndexGroupNameList { get; set; }
|
||||
public bool IsArray { get; set; }
|
||||
public Type UnderType { get; set; }
|
||||
public Navigat Navigat { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,19 +206,19 @@ namespace SqlSugar
|
||||
[AttributeUsage(AttributeTargets.Property, Inherited = true)]
|
||||
public class Navigat: Attribute
|
||||
{
|
||||
public string name { get; set; }
|
||||
public Type mappingType { get; set; }
|
||||
public string aId { get; set; }
|
||||
public string bId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public Type MappingType { get; set; }
|
||||
public string MappingAId { get; set; }
|
||||
public string MappingBId { get; set; }
|
||||
public Navigat(string name)
|
||||
{
|
||||
this.name = name;
|
||||
this.Name = name;
|
||||
}
|
||||
public Navigat(Type abType,string aId,string bId)
|
||||
{
|
||||
this.mappingType = mappingType;
|
||||
this.aId = aId;
|
||||
this.bId= bId;
|
||||
this.MappingType = abType;
|
||||
this.MappingAId = aId;
|
||||
this.MappingBId = bId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user