added a notes file for important running stuff
Create working for tenant and added in efcore and data layer
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user