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