using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EFCore { public class BloggingContext : DbContext { DbSet MealTypes { get; set; } public DbSet Meals { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder); optionsBuilder.UseSqlServer(@"Server=(local);initial catalog=FlughafenDB;integrated security=true;Trusted_Connection=True;TrustServerCertificate=True"); } } public class MealType { public int MealTypeId { get; set; } public string? Description { get; set; } public List Meals { get; } = new(); } public class Meal { public int MealId { get; set; } public string? MealName { get; set; } public string? MealDescription { get; set; } public int MealTypeId { get; set; } public MealType? MealType { get; set; } } }