CodeLiturgy.Dashboard/CodeLiturgy.Views/DbContexts/SiteDbContext.cs

33 lines
770 B
C#

using CodeLiturgy.Data.Application;
using Microsoft.EntityFrameworkCore;
using BlueWest.EfMethods;
using CodeLiturgy.Domain.Model;
namespace CodeLiturgy.Domain
{
public class SiteDbContext: DbContext
{
public DbSet<Site> Sites { get; set; }
public DbSet<SiteEnvironment> Environments { get; set; }
/// <summary>
/// SiteDbContext Constructor.
/// </summary>
/// <param name="options"></param>
public SiteDbContext(DbContextOptions<SiteDbContext> options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureCurrentDbModel();
}
}
}