public IConfiguration Configuration { get; }
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
services.AddDbContext<AppDbContext>(options =>
{
//MSSQL
//options.UseSqlServer(Configuration["Dbcontext:ConnectionString"]);
//MySQL
options.UseMySql(Configuration["DbContext:ConnectionString"]);
});
. Net Core实战+RESTful思想纵深课程,开发优雅RESTful风格API。
了解课程