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 0000000000000000000000000000000000000000..bd75d1739eaa3d125d531dabb8364665294c1f8e --- /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