From 168d413f7378fd2d82924b9cd4e180e3d4541de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AC=A7=E9=98=B3=E4=B9=BE?= <1517721417@qq.com> Date: Sun, 5 Jan 2025 23:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AC=A7=E9=98=B3=E4=B9=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\247\215\345\255\220\346\225\260\346\215\256.md" | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 "\346\254\247\351\230\263\344\271\276/\347\247\215\345\255\220\346\225\260\346\215\256.md" diff --git "a/\346\254\247\351\230\263\344\271\276/\347\247\215\345\255\220\346\225\260\346\215\256.md" "b/\346\254\247\351\230\263\344\271\276/\347\247\215\345\255\220\346\225\260\346\215\256.md" new file mode 100644 index 0000000..94b5ce1 --- /dev/null +++ "b/\346\254\247\351\230\263\344\271\276/\347\247\215\345\255\220\346\225\260\346\215\256.md" @@ -0,0 +1,9 @@ +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