This commit is contained in:
sunkaixuan
2017-05-18 10:17:43 +08:00
parent 0bd7100e75
commit d2147887f0
3 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ namespace OrmTest
{
static void Main(string[] args)
{
//Unit Test
/***Unit Test***/
//new Field(1).Init();
//new Where(1).Init();
//new Method(1).Init();
@@ -29,7 +29,7 @@ namespace OrmTest
//new Delete(1).Init();
new Mapping(1).Init();
//Performance Test
/***Performance Test***/
//new SqlSugarPerformance(100).Select();

View File

@@ -53,7 +53,6 @@ namespace SqlSugar
result.DbTableName = sugarTable.TableName;
}
result.Type = type;
result.Type.GetProperties();
result.EntityName = result.Type.Name;
result.Columns = new List<EntityColumnInfo>();
SetColumns(result);
@@ -115,6 +114,7 @@ namespace SqlSugar
column.DbTableName = result.DbTableName;
column.EnitytName = result.EntityName;
column.PropertyName = property.Name;
column.PropertyInfo = property;
if (sugarColumn.IsNullOrEmpty())
{
column.DbColumnName = property.Name;

View File

@@ -24,7 +24,7 @@ namespace SqlSugar
var mappingInfo = context
.MappingColumns
.FirstOrDefault(it => it.EntityPropertyName.Equals(name, StringComparison.CurrentCultureIgnoreCase));
return (mappingInfo == null ? "["+name+"]" : mappingInfo.DbColumnName);
return (mappingInfo == null ? "["+name+"]" : "["+mappingInfo.DbColumnName+"]");
}
}
}