You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
537 B
C#

using System;
using Txgy.EWS.Server.EFCore;
using Txgy.EWS.Server.ICommon;
namespace Txgy.EWS.Server.Common
{
public class DbConnectionFactory : IDbConnectionFactory
{
IConfiguration _configuration;
public DbConnectionFactory(IConfiguration configuration)
{
_configuration = configuration;
}
public EFCoreContext CreateDbContext()
{
return new EFCoreContext(_configuration.Read("DbConnectStr"));// 只是针对SqlServer
}
}
}