This commit is contained in:
610262374@qq.com
2017-03-03 10:44:00 +08:00
parent 95487f773d
commit 754bdb8e86
3 changed files with 7 additions and 2 deletions

View File

@@ -12,6 +12,11 @@ namespace SqlSugar
this.RemoveAll(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase));
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>

View File

@@ -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();
exp.Resolve(joinExpression, ResolveExpressType.Join);

View File

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