You've already forked Extensions.Configuration.EntityFrameworkCore
Remove interface that's not adding much value + other minor cleanups
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
@@ -17,9 +16,9 @@ internal interface IEntityFrameworkCoreDbSetConfigurationProvider : IConfigurati
|
||||
internal class EntityFrameworkCoreDbSetConfigurationProvider<TDbContext> : ConfigurationProvider, IEntityFrameworkCoreDbSetConfigurationProvider
|
||||
where TDbContext : DbContext, ISettingsDbContext<IQueryable<ISetting>>
|
||||
{
|
||||
private readonly IEntityFrameworkCoreDbSetConfigurationSource<TDbContext> _configurationSource;
|
||||
private readonly EntityFrameworkCoreDbSetConfigurationSource<TDbContext> _configurationSource;
|
||||
|
||||
internal EntityFrameworkCoreDbSetConfigurationProvider(IEntityFrameworkCoreDbSetConfigurationSource<TDbContext> configurationSource) : base()
|
||||
internal EntityFrameworkCoreDbSetConfigurationProvider(EntityFrameworkCoreDbSetConfigurationSource<TDbContext> configurationSource) : base()
|
||||
{
|
||||
_configurationSource = configurationSource;
|
||||
}
|
||||
@@ -35,15 +34,11 @@ internal class EntityFrameworkCoreDbSetConfigurationProvider<TDbContext> : Confi
|
||||
public new void OnReload() => base.OnReload();
|
||||
}
|
||||
|
||||
internal interface IEntityFrameworkCoreDbSetConfigurationSource<TDbContext> where TDbContext : DbContext
|
||||
{
|
||||
internal Func<TDbContext> DbContextFactory { get; }
|
||||
}
|
||||
|
||||
internal class EntityFrameworkCoreDbSetConfigurationSource<TDbContext> : IConfigurationSource, IEntityFrameworkCoreDbSetConfigurationSource<TDbContext>
|
||||
internal class EntityFrameworkCoreDbSetConfigurationSource<TDbContext> : IConfigurationSource
|
||||
where TDbContext : DbContext, ISettingsDbContext<IQueryable<ISetting>>
|
||||
{
|
||||
public required Func<TDbContext> DbContextFactory { get; init; }
|
||||
public required System.Func<TDbContext> DbContextFactory { get; init; }
|
||||
|
||||
public IConfigurationProvider Build(IConfigurationBuilder builder)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace RAIC.Extensions.Configuration.EntityFrameworkCore;
|
||||
|
||||
public interface ISettingsDbContext<out TSettings> : IDisposable
|
||||
public interface ISettingsDbContext<out TSettings> : System.IDisposable
|
||||
where TSettings : System.Linq.IQueryable<ISetting>
|
||||
{
|
||||
TSettings Settings { get; }
|
||||
|
||||
Reference in New Issue
Block a user