mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
This commit is contained in:
parent
1b421722ed
commit
63ea706dcb
@ -826,5 +826,14 @@
|
|||||||
<param name="that"></param>
|
<param name="that"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Microsoft.Extensions.DependencyInjection.FreeSqlRepositoryDependencyInjection.AddFreeRepository(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{FreeSql.FluentDataFilter},System.Reflection.Assembly[])">
|
||||||
|
<summary>
|
||||||
|
批量注入 Repository,可以参考代码自行调整
|
||||||
|
</summary>
|
||||||
|
<param name="services"></param>
|
||||||
|
<param name="globalDataFilter"></param>
|
||||||
|
<param name="assemblies"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
</members>
|
</members>
|
||||||
</doc>
|
</doc>
|
||||||
|
@ -976,20 +976,21 @@ namespace FreeSql.Internal.CommonProvider
|
|||||||
{
|
{
|
||||||
if (tb.Type == SelectTableInfoType.Parent) continue;
|
if (tb.Type == SelectTableInfoType.Parent) continue;
|
||||||
if (dict.ContainsKey(tb.Table.Type)) continue;
|
if (dict.ContainsKey(tb.Table.Type)) continue;
|
||||||
var name = tr?.Invoke(tb.Table.Type, tb.Table.DbName);
|
var tbname = _commonUtils.GetEntityTableAopName(tb.Table, true);
|
||||||
if (string.IsNullOrEmpty(name)) name = tb.Table.DbName;
|
var newname = tr?.Invoke(tb.Table.Type, tbname);
|
||||||
|
if (string.IsNullOrEmpty(newname)) newname = tbname;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (name.IndexOf(' ') == -1) //还可以这样:select.AsTable((a, b) => "(select * from tb_topic where clicks > 10)").Page(1, 10).ToList()
|
if (newname.IndexOf(' ') == -1) //还可以这样:select.AsTable((a, b) => "(select * from tb_topic where clicks > 10)").Page(1, 10).ToList()
|
||||||
{
|
{
|
||||||
if (_orm.CodeFirst.IsSyncStructureToLower) name = name.ToLower();
|
if (_orm.CodeFirst.IsSyncStructureToLower) newname = newname.ToLower();
|
||||||
if (_orm.CodeFirst.IsSyncStructureToUpper) name = name.ToUpper();
|
if (_orm.CodeFirst.IsSyncStructureToUpper) newname = newname.ToUpper();
|
||||||
if (_orm.CodeFirst.IsAutoSyncStructure) _orm.CodeFirst.SyncStructure(tb.Table.Type, name);
|
if (_orm.CodeFirst.IsAutoSyncStructure) _orm.CodeFirst.SyncStructure(tb.Table.Type, newname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
name = name.Replace(" \r\n", " \r\n ");
|
newname = newname.Replace(" \r\n", " \r\n ");
|
||||||
}
|
}
|
||||||
dict.Add(tb.Table.Type, name);
|
dict.Add(tb.Table.Type, newname);
|
||||||
}
|
}
|
||||||
unions.Add(dict);
|
unions.Add(dict);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user