更新框架,增加云库搜索模块
This commit is contained in:
1 parent
8526e5e0d2
commit
f2caec6083
192 files changed
+3626
-804
No files matched your search
@@ -0,0 +1,54 @@
|
||||
using FreeSql;
|
||||
using MAX.Core.DependencyInjection;
|
||||
using MAX.Core.Interfaces;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Store.Framework
|
||||
{
|
||||
public class Startup : IStartup
|
||||
{
|
||||
public int Priority => int.MaxValue - 1;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Register(IServiceRegistrar registrar)
|
||||
{
|
||||
//Func<IServiceProvider, IFreeSql> userFsqlFactory = r =>
|
||||
//{
|
||||
// var config = r.GetRequiredService<IConfiguration>();
|
||||
// var connection = config.GetConnectionString("UserConnection");
|
||||
// IFreeSql fsql = new FreeSql.FreeSqlBuilder()
|
||||
// .UseConnectionString(FreeSql.DataType.MySql, connection)
|
||||
// .UseAdoConnectionPool(true)
|
||||
// .Build();
|
||||
// return fsql;
|
||||
//};
|
||||
//registrar.RegisterSingleton<IFreeSql>("UserDB", (s, k) =>
|
||||
//{
|
||||
// return userFsqlFactory(s);
|
||||
//});
|
||||
|
||||
|
||||
|
||||
Func<IServiceProvider, IFreeSql> KJDFsqlFactory = r =>
|
||||
{
|
||||
var config = r.GetRequiredService<IConfiguration>();
|
||||
var connection = config.GetConnectionString("KJDConnection");
|
||||
IFreeSql fsql = new FreeSql.FreeSqlBuilder()
|
||||
.UseConnectionString(FreeSql.DataType.MySql, connection)
|
||||
.UseAdoConnectionPool(true)
|
||||
.Build();
|
||||
return fsql;
|
||||
};
|
||||
registrar.RegisterSingleton<IFreeSql>("KJDDB", (s, k) =>
|
||||
{
|
||||
return KJDFsqlFactory(s);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user