Browse Source

-

pull/12/MERGE
610262374@qq.com 8 years ago
parent
commit
754bdb8e86
  1. 5
      SqlSugar/Entities/SugarList.cs
  2. 2
      SqlSugar/SqlSugarAccessory.cs
  3. 2
      SqlSugar/SqlSugarClient.cs

5
SqlSugar/Entities/SugarList.cs

@ -12,6 +12,11 @@ namespace SqlSugar
this.RemoveAll(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase)); this.RemoveAll(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new MappingTable() { EntityName = entityName, DbTableName = dbTableName }); this.Add(new MappingTable() { EntityName = entityName, DbTableName = dbTableName });
} }
public void Add(string entityName, string dbTableName,string dbTableShortName)
{
this.RemoveAll(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new MappingTable() { EntityName = entityName, DbTableName = dbTableName, DbShortTaleName =dbTableShortName});
}
} }
public class MappingColumnList: List<MappingColumn> public class MappingColumnList: List<MappingColumn>

2
SqlSugar/SqlSugarAccessory.cs

@ -101,7 +101,7 @@ namespace SqlSugar
}); });
} }
protected List<JoinQueryInfo> GetJoinInfos(Expression joinExpression, SqlSugarClient context) protected List<JoinQueryInfo> GetJoinInfos(Expression joinExpression, SqlSugarClient context,params Type [] entityTypeArray)
{ {
ExpressionContext exp = new ExpressionContext(); ExpressionContext exp = new ExpressionContext();
exp.Resolve(joinExpression, ResolveExpressType.Join); exp.Resolve(joinExpression, ResolveExpressType.Join);

2
SqlSugar/SqlSugarClient.cs

@ -144,7 +144,7 @@ namespace SqlSugar
public virtual ISugarQueryable<T> Queryable<T, T2>(Expression<Func<T,T2,object []>> joinExpression) where T : class, new() public virtual ISugarQueryable<T> Queryable<T, T2>(Expression<Func<T,T2,object []>> joinExpression) where T : class, new()
{ {
var queryable = Queryable<T>(); var queryable = Queryable<T>();
SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression,this); SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression,this,typeof(T), typeof(T2));
return queryable; return queryable;
} }
public virtual ISugarQueryable<T> Queryable<T, T2, T3>(Func<T, T2,T3, object[]> joinExpression) where T : class, new() public virtual ISugarQueryable<T> Queryable<T, T2, T3>(Func<T, T2,T3, object[]> joinExpression) where T : class, new()

Loading…
Cancel
Save