时间:2021-07-01 10:21:17 帮助过:17人阅读
3.再创建一个类库项目
创建DemoContext类(与数据库交互)
public class DemoContext : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseSqlServer( connectionString: "server=.;database=MyTestDB;uid=sjz2018dbuser;pwd=1ECD9E*#E9DCE1;" ); } public DbSet<ClassInfo> ClassInfos { get; set; } public DbSet<UsersInfo> UsersInfos { get; set; } }DemoContext
所引nuget包
Net Core + EF Core + Sql Server
标签:pen max gif protect contex 创建 span pwd protected