using Microsoft.EntityFrameworkCore; namespace USEntryCoach.Server.Data; public class BloggingContext : DbContext { public DbSet Blogs { get; set; } public DbSet Posts { get; set; } public BloggingContext (DbContextOptions options) : base(options) { } //public string ConnectionString { get; } = configuration.GetConnectionString("Default") ?? "No connection string"; //protected override void OnConfiguring(DbContextOptionsBuilder options) => options.UseNpgsql(ConnectionString); } public class Blog { public int BlogId { get; set; } public string Url { get; set; } public List Posts { get; } = new(); } public class Post { public int PostId { get; set; } public string Title { get; set; } public string Content { get; set; } public int BlogId { get; set; } public Blog Blog { get; set; } }