using CodeLiturgy.Data.Application; using Microsoft.EntityFrameworkCore; using BlueWest.EfMethods; namespace CodeLiturgy.Domain { [EfGenerator] public class SiteDbContext: DbContext { [EfGetOneBy(nameof(Site.Id), typeof(SiteUnique))] [EfGetOne(typeof(SiteUnique))] [EfGetMany(typeof(SiteUnique))] public DbSet Sites { get; set; } public DbSet Environments { get; set; } /// /// SiteDbContext Constructor. /// /// public SiteDbContext(DbContextOptions options) : base(options) { Database.EnsureCreated(); } } }