update navigat query

This commit is contained in:
sunkaixuan
2022-04-11 11:27:58 +08:00
parent 492f9784e8
commit ba63399bdf
3 changed files with 15 additions and 8 deletions

View File

@@ -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)

View File

@@ -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; }
} }
} }

View File

@@ -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;
} }
} }