using Microsoft.EntityFrameworkCore; using System.Collections.Generic; namespace Api.Models { public class Product { public int Id { get; set; } public string? Name { get; set; } public decimal Price { get; set; } } public class AppDbContext : DbContext { public AppDbContext(DbContextOptions options) : base(options) { } public DbSet Products { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); // Seed data modelBuilder.Entity().HasData( new Product { Id = 1, Name = "Sample Product", Price = 9.99M } ); } } }