mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
-
This commit is contained in:
@@ -14,8 +14,8 @@ namespace OrmTest.Models
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "ID")]
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int SchoolId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
[SugarColumn(IsIgnore=true)]
|
||||
[NotMappedAttribute]
|
||||
|
@@ -18,15 +18,15 @@ namespace OrmTest
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/***Unit Test***/
|
||||
//new Field(1).Init();
|
||||
//new Where(1).Init();
|
||||
//new Method(1).Init();
|
||||
//new JoinQuery(1).Init();
|
||||
//new SingleQuery(1).Init();
|
||||
//new SelectQuery(1).Init();
|
||||
//new AutoClose(1).Init();
|
||||
//new Insert(1).Init();
|
||||
//new Delete(1).Init();
|
||||
new Field(1).Init();
|
||||
new Where(1).Init();
|
||||
new Method(1).Init();
|
||||
new JoinQuery(1).Init();
|
||||
new SingleQuery(1).Init();
|
||||
new SelectQuery(1).Init();
|
||||
new AutoClose(1).Init();
|
||||
new Insert(1).Init();
|
||||
new Delete(1).Init();
|
||||
new Mapping(1).Init();
|
||||
|
||||
/***Performance Test***/
|
||||
|
@@ -38,6 +38,7 @@ namespace SqlSugar
|
||||
public object SelectValue { get; set; }
|
||||
public string SelectCacheKey { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
public Type EntityType { get; set;}
|
||||
public string TableWithString { get; set; }
|
||||
public string GroupByValue { get; set; }
|
||||
public int WhereIndex { get; set; }
|
||||
@@ -285,7 +286,7 @@ namespace SqlSugar
|
||||
{
|
||||
pre = Builder.GetTranslationColumnName(TableShortName) + ".";
|
||||
}
|
||||
reval = string.Join(",", this.Context.EntityProvider.GetAllEntities().Single(it=>it.EntityName==this.EntityName).Columns.Where(it=>!it.IsIgnore).Select(it => pre + Builder.GetTranslationColumnName(it.PropertyName)));
|
||||
reval = string.Join(",", this.Context.EntityProvider.GetEntityInfo(this.EntityType).Columns.Where(it=>!it.IsIgnore).Select(it => pre + Builder.GetTranslationColumnName(it.PropertyName)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -140,6 +140,7 @@ namespace SqlSugar
|
||||
result.SqlBuilder.QueryBuilder = InstanceFactory.GetQueryBuilder(base.CurrentConnectionConfig);
|
||||
result.SqlBuilder.QueryBuilder.Builder = sqlBuilder;
|
||||
result.SqlBuilder.Context = result.SqlBuilder.QueryBuilder.Context = this;
|
||||
result.SqlBuilder.QueryBuilder.EntityType = typeof(T);
|
||||
result.SqlBuilder.QueryBuilder.EntityName = typeof(T).Name;
|
||||
result.SqlBuilder.QueryBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(base.CurrentConnectionConfig);
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user