using Microsoft.EntityFrameworkCore; public class SteamDbContext : DbContext { public DbSet SteamUserCredentials { get; set; } public SteamDbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { // Create a unique index on TeamId and UserId modelBuilder.Entity() .HasIndex(c => new { c.TeamId, c.UserId }) .IsUnique(); } }