4ee8b9101d
Create working for tenant and added in efcore and data layer
34 lines
796 B
C#
34 lines
796 B
C#
using Emergence.data.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
|
namespace Emergence.data.Contexts
|
|
{
|
|
public class AdminDbContext : DbContext
|
|
{
|
|
public AdminDbContext() : base()
|
|
{
|
|
|
|
}
|
|
|
|
public AdminDbContext(DbContextOptions<AdminDbContext> options) : base(options) {
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder builder)
|
|
{
|
|
base.OnModelCreating(builder);
|
|
}
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
optionsBuilder.UseSeeding((context, _) =>
|
|
{
|
|
context.SaveChanges();
|
|
});
|
|
}
|
|
|
|
public DbSet<Tenant> Tenant { get; set; }
|
|
}
|
|
}
|