Browse Source

Support virtual attributes

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
33e848f7e9
  1. 4
      Src/Asp.Net/SqlSugar/Abstract/EntityProvider/EntityProvider.cs

4
Src/Asp.Net/SqlSugar/Abstract/EntityProvider/EntityProvider.cs

@ -107,8 +107,8 @@ namespace SqlSugar
foreach (var property in result.Type.GetProperties())
{
EntityColumnInfo column = new EntityColumnInfo();
var isVirtual = property.GetGetMethod().IsVirtual;
if (isVirtual) continue;
//var isVirtual = property.GetGetMethod().IsVirtual;
//if (isVirtual) continue;
var sugarColumn = property.GetCustomAttributes(typeof(SugarColumn), true)
.Where(it => it is SugarColumn)
.Select(it => (SugarColumn)it)

Loading…
Cancel
Save