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