mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
-
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OrmTest.UnitTest
|
|||||||
.Where("st.id>@id")
|
.Where("st.id>@id")
|
||||||
.AddParameters(new { id = 1 })
|
.AddParameters(new { id = 1 })
|
||||||
.Select("st.*").ToSql();
|
.Select("st.*").ToSql();
|
||||||
string sql = @"SELECT st.* FROM [STudent] st Left JOIN School sh ON sh.id=st.schoolid WHERE st.id>@id ";
|
string sql = @"SELECT st.* FROM [Student] st Left JOIN School sh ON sh.id=st.schoolid WHERE st.id>@id ";
|
||||||
base.Check(sql,new List<SugarParameter>() {new SugarParameter("@id",1)}, join3.Key, join3.Value, "join 3 Error");
|
base.Check(sql,new List<SugarParameter>() {new SugarParameter("@id",1)}, join3.Key, join3.Value, "join 3 Error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -70,18 +70,18 @@ namespace SqlSugar
|
|||||||
protected void InitMppingInfo<T>()
|
protected void InitMppingInfo<T>()
|
||||||
{
|
{
|
||||||
string cacheKey = "Context.InitAttributeMappingTables"+typeof(T).FullName;
|
string cacheKey = "Context.InitAttributeMappingTables"+typeof(T).FullName;
|
||||||
CacheFactory.Action<EntityInfo>(cacheKey,
|
var entityInfo=CacheFactory.Func<EntityInfo>(cacheKey,
|
||||||
(cm, key) =>
|
(cm, key) =>
|
||||||
{
|
{
|
||||||
var cacheInfo = cm[key];
|
var cacheInfo = cm[key];
|
||||||
InitMppingInfo(cacheInfo);
|
return cacheInfo;
|
||||||
},
|
},
|
||||||
(cm, key) =>
|
(cm, key) =>
|
||||||
{
|
{
|
||||||
var reval = this.Context.EntityProvider.GetEntityInfo<T>();
|
var reval = this.Context.EntityProvider.GetEntityInfo<T>();
|
||||||
InitMppingInfo(reval);
|
|
||||||
return reval;
|
return reval;
|
||||||
});
|
});
|
||||||
|
InitMppingInfo(entityInfo);
|
||||||
}
|
}
|
||||||
private void InitMppingInfo(EntityInfo entityInfo)
|
private void InitMppingInfo(EntityInfo entityInfo)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user