x
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-08-02 11:28:58 +08:00
parent fa9c9de12c
commit 9b4e29a812
@@ -18,7 +18,7 @@ namespace IRaCIS.Core.API
//这个注入没有成功--注入是没问题的,构造函数也只是支持参数就好,错在注入的地方不能写DbContext
//Web程序中通过重用池中DbContext实例可提高高并发场景下的吞吐量, 这在概念上类似于ADO.NET Provider原生的连接池操作方式,具有节省DbContext实例化成本的优点
services.AddDbContextPool<IRaCISDBContext>(options =>
services.AddDbContext<IRaCISDBContext>(options =>
{
options.UseSqlServer(configuration.GetSection("ConnectionStrings:RemoteNew").Value,
contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure());