Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
d2147887f0
  1. 4
      OrmTest/Program.cs
  2. 2
      SqlSugar/Abstract/DbProvider/EntityProvider/EntityProvider.cs
  3. 2
      SqlSugar/Realization/SqlServer/Core/SqlBuilder/SqlServerBuilder.cs

4
OrmTest/Program.cs

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

2
SqlSugar/Abstract/DbProvider/EntityProvider/EntityProvider.cs

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

2
SqlSugar/Realization/SqlServer/Core/SqlBuilder/SqlServerBuilder.cs

@ -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+"]");
}
}
}

Loading…
Cancel
Save