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 0000000000000000000000000000000000000000..94b5ce1380494e53d6bc23289cc293e689fc32af --- /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