iT邦幫忙

2017 iT 邦幫忙鐵人賽
DAY 9
0
自我挑戰組

ASP.NET MVC 5 初探系列 第 9

ASP.NET MVC 5 初探(9)

Code First--開始建立資料表內容
1.當Controller建立完成,重建方案後,按Code First 開始偵錯F5
在IE導覽列後輸入Controller名稱,本篇例子的Controller名稱是guestbooks
http://ithelp.ithome.com.tw/upload/images/20161223/20103822y49DIOTC6R.jpg

2.按下Create New,在文字方塊內建立資料,按Create
http://ithelp.ithome.com.tw/upload/images/20161223/20103822PFS6wG7e8V.jpg

3.資料寫入資料庫中
http://ithelp.ithome.com.tw/upload/images/20161223/20103822JEpnyFoYmD.jpg

4.方案總管中的資料庫建立完成
http://ithelp.ithome.com.tw/upload/images/20161223/20103822qKv7o1kBeW.jpg

5.點選資料庫,出現伺服器總管,也可發現資料庫已建立
http://ithelp.ithome.com.tw/upload/images/20161223/20103822aWuqvIt0tB.jpg


上一篇
ASP.NET MVC 5 初探(8)
下一篇
ASP.NET MVC 5 初探-中場休息(1)
系列文
ASP.NET MVC 5 初探12
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言