From 2c62ad7933f9eb41f4b6d29088829709818aadf3 Mon Sep 17 00:00:00 2001 From: hy <2733228499@qq.com> Date: Sun, 5 Jan 2025 20:39:58 +0800 Subject: [PATCH] zy --- ...7\247\215\345\255\220\346\225\260\346\215\256.md" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "\346\264\252\346\202\246/\350\257\276\345\240\202\347\254\224\350\256\260/20250105-\347\247\215\345\255\220\346\225\260\346\215\256.md" diff --git "a/\346\264\252\346\202\246/\350\257\276\345\240\202\347\254\224\350\256\260/20250105-\347\247\215\345\255\220\346\225\260\346\215\256.md" "b/\346\264\252\346\202\246/\350\257\276\345\240\202\347\254\224\350\256\260/20250105-\347\247\215\345\255\220\346\225\260\346\215\256.md" new file mode 100644 index 0000000..bd75d17 --- /dev/null +++ "b/\346\264\252\346\202\246/\350\257\276\345\240\202\347\254\224\350\256\260/20250105-\347\247\215\345\255\220\346\225\260\346\215\256.md" @@ -0,0 +1,12 @@ + +~~~ +public class AppDbContext : DbContext{ +public AppDbContext(DbContextOptions options) :base(options){} +protected override void OnModelCreating(ModelBuilder modelBuilder){ + modelBuilder.Entity().HasData( + new Idol{Id=1,Name="bk"}, + new Idol{Id=2,Name="pp"} + ) +} +} +~~~ \ No newline at end of file -- Gitee