using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using YPS.Beer.Models; namespace YPS.Beer.Data; public class BeerContext : IdentityDbContext { public BeerContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder builder) { builder.Entity() .HasMany(u => u.Favourites) .WithOne(f => f.User) .HasForeignKey("UserId"); base.OnModelCreating(builder); } }