using Hushian.Domain.Entites; using Microsoft.EntityFrameworkCore; namespace Hushian.Persistence { public class HushianDbContext : DbContext { public HushianDbContext(DbContextOptions options) :base(options) { } #region Table public DbSet Companies { get; set; } public DbSet Conversations { get; set; } public DbSet ConversationItems { get; set; } public DbSet Groups { get; set; } public DbSet Expers { get; set; } public DbSet EG { get; set; } public DbSet Users { get; set; } #endregion protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity().HasKey(c => new { c.ExperID, c.GroupID }); modelBuilder .ApplyConfigurationsFromAssembly(typeof(HushianDbContext).Assembly); } } }