課程
/后端開發(fā)
/C#
/打造你的第一個(gè)ASP.NET5 MVC網(wǎng)站應(yīng)用
為什么呢?
2021-07-13
源自:打造你的第一個(gè)ASP.NET5 MVC網(wǎng)站應(yīng)用 6-3
正在回答
已經(jīng)解決了,我真是個(gè)傻子。
把startup里services.AddDbContext<AppDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));(正確的)
寫成了services.AddDbContext<AppDbContext>(options => options.UseSqlServer("DefaultConnection"));(錯(cuò)的)
慕田峪3034895 提問者
這是我上一步操作生成的文件
舉報(bào)
熟練掌握ASP.Net 5 MVC的開發(fā)原則與使用方式
2 回答seed初始化和數(shù)據(jù)庫(kù)選擇問題
1 回答初始化數(shù)據(jù)庫(kù)時(shí),數(shù)據(jù)無法存入數(shù)據(jù)庫(kù)怎么回事?
2 回答update-database報(bào)錯(cuò)
1 回答執(zhí)行update-database時(shí),出現(xiàn)錯(cuò)誤
6 回答add-migration InitialMigration和update-database都出現(xiàn)同樣的結(jié)果
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2021-07-13
已經(jīng)解決了,我真是個(gè)傻子。
把startup里services.AddDbContext<AppDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));(正確的)
寫成了services.AddDbContext<AppDbContext>(options => options.UseSqlServer("DefaultConnection"));(錯(cuò)的)
2021-07-13
這是我上一步操作生成的文件