You've already forked Extensions.Configuration.EntityFrameworkCore
27 lines
595 B
C#
27 lines
595 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace RAIC.Extensions.Configuration.EntityFrameworkCore;
|
|
|
|
public interface ISettingsDbContext<out TSettings> : IDisposable
|
|
where TSettings : System.Linq.IQueryable<ISetting>
|
|
{
|
|
TSettings Settings { get; }
|
|
}
|
|
|
|
public interface ISettingsDbContextFactory<TDbContext>
|
|
where TDbContext : DbContext
|
|
{
|
|
static abstract TDbContext Create(DbContextOptions<TDbContext> options);
|
|
}
|
|
|
|
|
|
public interface ISetting
|
|
{
|
|
[Key]
|
|
string Key { get; }
|
|
|
|
[Required]
|
|
string Value { get; }
|
|
} |