2025-04-01 13:41:50 +08:00
|
|
|
|
using RIZO.Server.EFCore;
|
|
|
|
|
|
|
|
|
|
|
|
namespace RIZO.Server.EFContext
|
|
|
|
|
|
{
|
|
|
|
|
|
public class EFContext : IEFContext.IEFContext
|
|
|
|
|
|
{
|
|
|
|
|
|
IConfiguration.IConfiguration _configuration;
|
|
|
|
|
|
public EFContext(IConfiguration.IConfiguration configuration)
|
|
|
|
|
|
{
|
|
|
|
|
|
_configuration = configuration;
|
|
|
|
|
|
}
|
2025-04-01 14:02:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-04-01 13:41:50 +08:00
|
|
|
|
public EFCoreContext CreateDBContext()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new EFCoreContext(_configuration.Read("DBConnectStr"));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|