using Microsoft.EntityFrameworkCore; using TicketManager.Models; namespace TicketManager.Data { public class AppDbContext : DbContext { public AppDbContext(DbContextOptions options) : base(options) { } public DbSet Projects { get; set; } public DbSet AppUsers { get; set; } public DbSet Tickets { get; set; } public DbSet Assignments { get; set; } public DbSet Activities { get; set; } public DbSet Notes { get; set; } public DbSet Files { get; set; } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); builder.Entity().HasKey(a => new { a.ProjectId, a.UserId }); } } }