📅  最后修改于: 2022-03-11 14:48:38.440000             🧑  作者: Mango
public class NorthwindContext : DbContext
{
public NorthwindContext(DbContextOptions options):base(options) { }
public NorthwindContext() { }
protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity().HasKey(table => new {
table.FriendId, table.UserId
});
}
public DbSet Relationships { get; set; }
public DbSet Users { get; set; }
}