|
|
@ -1,26 +1,33 @@
|
|
|
|
// using JetBrains.Annotations;
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
// using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
// using System;
|
|
|
|
using System;
|
|
|
|
// using Oracle.EntityFrameworkCore.Infrastructure;
|
|
|
|
using Oracle.EntityFrameworkCore.Infrastructure;
|
|
|
|
// using Volo.Abp.EntityFrameworkCore.DependencyInjection;
|
|
|
|
using Volo.Abp.EntityFrameworkCore.DependencyInjection;
|
|
|
|
//
|
|
|
|
|
|
|
|
// namespace Volo.Abp.EntityFrameworkCore
|
|
|
|
namespace Volo.Abp.EntityFrameworkCore
|
|
|
|
// {
|
|
|
|
{
|
|
|
|
// public static class AbpDbContextConfigurationContextOracleExtensions
|
|
|
|
public static class AbpDbContextConfigurationContextOracleExtensions
|
|
|
|
// {
|
|
|
|
{
|
|
|
|
// public static DbContextOptionsBuilder UseOracle(
|
|
|
|
public static DbContextOptionsBuilder UseOracle(
|
|
|
|
// [NotNull] this AbpDbContextConfigurationContext context,
|
|
|
|
[NotNull] this AbpDbContextConfigurationContext context,
|
|
|
|
// [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null)
|
|
|
|
[CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null)
|
|
|
|
// {
|
|
|
|
{
|
|
|
|
// TODO: UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
|
|
|
|
if (context.ExistingConnection != null)
|
|
|
|
// if (context.ExistingConnection != null)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
return context.DbContextOptions.UseOracle(context.ExistingConnection, optionsBuilder =>
|
|
|
|
// return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction);
|
|
|
|
{
|
|
|
|
// }
|
|
|
|
optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
|
|
|
|
// else
|
|
|
|
oracleOptionsAction?.Invoke(optionsBuilder);
|
|
|
|
// {
|
|
|
|
});
|
|
|
|
// return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
else
|
|
|
|
// }
|
|
|
|
{
|
|
|
|
// }
|
|
|
|
return context.DbContextOptions.UseOracle(context.ConnectionString, optionsBuilder =>
|
|
|
|
// }
|
|
|
|
{
|
|
|
|
|
|
|
|
optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
|
|
|
|
|
|
|
|
oracleOptionsAction?.Invoke(optionsBuilder);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|