<address id="xpjh9"><listing id="xpjh9"><meter id="xpjh9"></meter></listing></address>

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
<noframes id="xpjh9">
<noframes id="xpjh9">

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
    <form id="xpjh9"></form><address id="xpjh9"><listing id="xpjh9"><menuitem id="xpjh9"></menuitem></listing></address>

      <noframes id="xpjh9">
      VB.net 2010 視頻教程 VB.net 2010 視頻教程 VB.net 2010 視頻教程
      SQL Server 2008 視頻教程 c#入門經典教程 Visual Basic從門到精通視頻教程
      當前位置:
      首頁 > 編程開發 > .net教程 >
      • ASP.net教程之ABP——切換MySQL數據庫

      • 2019-06-12 13:08 來源:未知

      我是一名.net新手,應公司要求開始學習.net,使用的是土耳其大牛寫的框架ASP.NET Boilerplate 簡稱ABP,是基于DDD的現代ASP.NET開發框架,ABP提供了一個啟動模板用于新建的項目。經過多方閱讀,自己進行實踐,并進行總結。需要把這個模板搭建起來,微軟下載的原始模板使用的數據庫是SqlServer,由于個人原因需要將其進行修改。本人所使用的是win7系統,數據庫是Mysql,軟件使用的是vs2017。
      進入正題先進入微軟的官網:https://aspnetboilerplate.com/Templates

      按照步驟進行操作,點擊create my project

      進行等待下載,下載完成后,將壓縮包解壓到一個文件夾下面,打開文件夾找到aspnet-core, 找到以*.sln結尾的文件打開

      1.打開以后點擊解決方案,先還原NuGet包

      如下圖顯示

      2.安裝MySql.Data.Entity
      在vs2017中右擊解決方案 =》找到管理解決方案NuGet程序包

      打開后的頁面 并輸入MySql.Data.Entity ,我下載的是最新版的,當最新版的沒有遷移成功時,卸載當前最新版本,下載低版本的,并測試

      當然也可以使用命令進行安裝數據庫插件點擊工具=》NuGet包管理器=》程序包管理器控制臺
      在控制臺中程序包源選擇 全部 默認程序選擇 *.EntityFrameworkCore
      依次輸入
      install-package pomelo.entityframeworkcore.mysql.design

      install-package pomelo.entityframeworkcore.mysql

      3.更改配置文件

      在解決方案entityframeworkcore層找到DbContextConfigurer文件,修改里面的內容

      4.卸載sql server的NuGet包
      在程序包管理器控制臺使用代碼進行卸載

      uninstall-package microsoft.entityframeworkcore.sqlserver
      5.重新修改數據庫連接字符串
      找到appsettings.json文件重新修改數據庫連接字符串進行修改
      "Default": "Server=localhost;Port=3306;Database=數據庫名字;Uid=root;Pwd=數據庫密碼;"
      6.下載并安裝Mysql
      輸入連接 https://dev.mysql.com/downloads/mysql/5.5.html#downloads 下載并安裝mysql 
      7.重新添加數據遷移
      找到*.EntityFrameworkCore層的Migrations文件夾,刪除文件夾里面的所有文件,不要刪除文件夾。刪除完文件之后,重新生成解決方案。接著在程序包管理器控制臺 默認程序選擇 *.EntityFrameworkCore 敲入命令Add-Migration NewInit 當出現 To undo this action, use Remove-Migration. 時為執行成功。

      再次執行 update-database 出現Applying migration '20190513024725_NewInit'. 數據庫遷移成功。在Mysql數據庫中就可以看到所有的表。
      注:
      有的小伙伴可能執行會出錯(當然這是我安裝過程中遇到的問題 ), 可能會有以下幾個問題
      1.PowerShell version 2.0 is not supported. Please upgrade PowerShell to 3.0 or greater and restart Visual Studio.
      對于這個問題是由于win7系統版本較低,需要更新 。在微軟官網即https://www.microsoft.com/zh-CN/download/details.aspx?id=40855 這個地址,下載安裝 Windows6.1-KB2819745-x64-MultiPkg.msu 即可。當然若是新系統或win10應該不會出現這樣的問題
      2.Your startup project 'YTMyprocte.Web.Host' doesn't reference Microsoft.EntityFrameworkCore.Design.
      這個問題是由于缺Microsoft.EntityFrameworkCore.Design.包,將這個包裝上之后就ok了。

      作為新人,第一次寫博客,請多提意見,謝謝

      相關教程
      江苏快3 4461.com | 9193.com | www.07679g.com | 2214cc.com | www.35918d.com | 1hg7788.com | www.477680.com | www.61355.com | 88449193.com | www.hr1333.com | 6868bb.cc | www.959122.com | www.xg0088z.com | xx888e.com | www.91779l.com | 66287k.com | www.1035p.com | www.33928a07.com | 2078v.com | www.97828t.vip | 2649ff.com | www.549677.com | www.hg3115.com | djbet.com | www.b63568.com | 23800e.com | www.103380.com | www.79500s.com | 8037a.com | www.ji224.com | www.pu382.com | 4379m.com | www.zmfqp.net | www.7435z.com | 5443m.com | www.65066dd.com | pj88vv.com | www.952583.com | www.p5550.com | 80118cp.com | www.00840i.com | www.s27229.com | 3616h.com | www.773560.com | 0600s.cc | 921710.com | www.4521x.com | 2709v.com | 9288.us | www.0071331.com | jsjlb4.com | 8203ccc.com | www.c2894.com | 56988o.vip | 23800r.com | www.44118b.com | xx56988.com | xpj70068.com | www.8c999.com | bwin970.co | 56988z.com | www.0022sun.com | www.hg15678.com | 1389mm.com | www.799076.com | www.2846k.com | evuyl.com | www.33588q.com | www.vb003.com | 30171177.com | www.560621.com | www.pj88s.com | j58000.com | mr8001.com | www.99677r.com | www.122445.com | 98345i.com | www.ck9393.com | www.xx3088.com | m77304.com | 65005l.com | www.hr1555.com | www.55225454.com | lh66r.com | www.899465.com | www.4972x.com | 1669v.com | www.1382002.com | tz22888.com | www.717699.com | www.668puj.com | www.39695o.com | ddh5154.com | www.767198.com | www.89599y.com | 4546vip9.com | 911boan.com | www.930557.com | www.4058ss.com | www.76060j.com | 9479d4.com | www.501866.com | www.hg8.vip | www.16076.com | rr1915.com | 60540055.com | www.67767.cc | www.50999w.com | www.68666s.com | 5478d.com | www.599641.com | www.js89j.vip | www.1389v.com | x77304.com | 5647z.com | www.500vp.com | www.115527t.com | www.87680i.com | 7605u.com | 771381.com | www.hqcp2.com | www.79095g.com | www.440887.com | 33318h.com | 123456uu.cc | www.771219.com | www.xpj77123.com | www.61497.com | 33382r.com | 4255hhh.com | www.912269.com | www.44118m.com | www.xhf5555.com | 0808bc.com | 33558448.com | www.332910.com | www.bet73c.com | www.58665n.com | www.3459o.com | 26668g.com | 3121h.com | www.621410.com | www.16065t.com | www.301393.com | www.21365mm.com | mgm3242l.com | tzvip2022.com | www.33598e.com | www.26878n.com | www.v32031.com | www.hg8357.com | www.8807js.com | 4165t.com | 67890dd.com | www.540877.com | www.96386w.com | www.89677m.com | www.h7733.com | 4048vip3.com | 67877x.com | 3807bb.com | t365.com | www.673290.com | www.yun588.com | www.57800h.com | www.hg3326.com | www.sjs11.com | 21488app.com | dw777.net | 4441779.com | 7893900.com | www.855271.com | www.4323h.com | www.58404b.com | www.beb100.com | www.g1018.com | 3178z.com | x40033.com | aaa2848.com | 22115156.com | 6199600.com | www.574277.com | www.7793d.com | www.2221104.com | www.63606r.com | www.ggo.99233o.com | www.558337.com | www.7435s.com | qycps05.com | d86226.com | w9629.com | 12580088.com | 3225j.com | kbk2275.com | www.342577.com | www.976981.com | www.33598j.com | www.h6640.com | www.377666f.com | www.998855u.com | www.814c.com | www.am187.com | www.115888.com | 6556g.com | feicai0477.com | 50099i.com | 3559kk.com | 4255s.com | 59889d.com | 20770033.com | 996622cc.com | 3678vv.com | 818.cc | express.com | p5377.com | www.100202.com | www.497918.com | www.840680.com | www.czg1.com | www.766464.com | www.ck9595.com | www.3136aa.com | www.3890e.com | www.21202f.com | www.81520j.com | www.904029.com | www.99677x.com | www.61233d.com | www.55228f.com | www.08588b.com | www.7782t.com | www.26163q.com | www.5522d.cc | www.hf5886.com | www.wcp6698.com | www.cb0999.com | www.860705.com | www.623660.com | www.452809.com | www.86267u.com | 55ww8332.com | 5478o.com | 37111c.com | 77009193.com | k60111.com | r7742.com | 2jsqqq.com | ambyc5.com | pj677x.com | www.4763118.com | www.87680g.com | www.b32126.cc | www.53516n.com | www.ii7966i.com | www.rgcp111.com | www.16181u.com | www.377666d.com | www.4809l.com | www.tyc88666.com | www.0014n.com | www.607315.com | www.139733.com | 2139.com | 2287hh.com | 0860p.com | 8381p.com | 2613t.com | www.388103.com | www.pj8790.com | www.bsyedu.com | www.88166h.com | www.r999992.com | www.15355a.com | www.qucp1.com | www.343577.com | 2189000.com | 1434p.com | 4488o.com | 131p.net | www.vns0708.com | www.8088msc.com | www.50999h.com | www.32031c.com | www.ky1002.com | www.cp8019.cc | nn500i.com | 11zz8331.com | 01885e.com | www.hg18518.com | www.4249.com | www.04567n.com | www.564288.com | www.33588k.com | www.565753.com | 2554.com | 3640ww.com | 168cp-k.com | www.hg5336.com | www.ebo666.com | www.r98478.com | www.ct6679.com | feicai0577.com | 3999xl.com | 2247t.com | www.9b100.com | www.28000x.com | www.0967006.com | www.785579.com | 4637766.com | ctxcp26.com | 9030u.com | www.8030c.com | www.j36.cc | www.8816t.com | 7720s.com | 19880v.com | www.8520f.com | www.858t.com | www.725603.com | www.977657.com | 73999y.com | blmdc5.com | www.8494x.com | www.58665o.com | www.xb77.com | www.083037.com | 8722qqqq.com | 6137r.net | www.4676.cc | www.js0909.com | www.611026.com | c388x.com | 7141jj.com | www.hg0180.com | www.0600.cc | www.943977.com | 1705y.com | hg0886.ws | www.366086.com | www.14168d.com | www.775702.com | 33318v.com | 33115n.com | www.58458.com | www.jsbet008.com | 00778l.com | mm1915.com | www.0005156.com | www.130256.com | www.737298.com | 7240w.com | vns100.net | www.38345q.com | www.6364e.com | 7945gg.com | zhcp60.com | www.5055msc.com | www.50052r.com | 38345t.com | aa2205.com | www.hjcp0.com | www.00840s.com | 895vv.com | 8883.cc | www.3033b.com | www.50064r.com | www.944990.com | 91019q.com | 50099w.com | www.70545d.com | www.113744.com | ylzz6.cc | 1634u.com | www.bet63x.com | www.723013.com | 0289f.com | www.q8867.com | www.7240h.com | 7742r.com | 22299ii.com | www.yifa325.com | www.78gcw.com | w88u18.com | www.77537i.com | www.8998883.com | 2535.com | 18438000.com | www.0600b.cc | s4048eee.com | 61652k.com | www.c83377.com | www.106569.com | 2055.com | www.98698j.com | www.619616.com | 27878cc.com | www.511289.com | www.369888a.com | 3778yy.com | www.333193.com | www.588yc.com | 065l.com | www.xihu77.com | www.igcp5.com | 3640s.com | www.986655.com | www.am1115.com | 57157s.com | www.msc44.com | www.655096.com | nn500d.com | www.rycp156.com | www.517844.com | by309.com | www.7.ag | 88048.com | www.pj57777.com | www.l98478.com | 15g1.net | www.wnsr999.com | www.35733.com | 62222x.com | www.7668888.com | www.607212.com | 28288i.com | www.1754c.com | 83377k.com | www.4763118.com | www.4323s.com | feicai0431.com | www.666478.com | www.612110.com | hd6766.com | www.99552bb.com | 3178s.com | www.78929.com | www.ya248.com | jing555.com | www.xpj668.com | 6641z.com | www.77537s.com | www.ya238.com | 32yxw.com | www.45598u.com | 26444w.com | www.06797x.com | www.zcwf3.com | bet28o.com | www.883399c.com | 45460006.com | www.640suncity.com | www.187135.com | www.js80388.com | www.33598z.com | 26789.com | 62222d.com | www.hgw6668.com | 55555309.com | www.5095l.com | 5856sss.com | www.bwinyz07.com | www.332760.com | www.52072u.com | www.yh03456.com | www.6832r.com | bet599.com | www.12136v.com | 8006501.com | www.ok99.com | 1168x.com | www.23277.com | ag8282g.com | www.4446358.com | www.721560.com | www.86611i.com | www.10380.cc | 4776622.com | www.531089.com | 36404411.com | www.1779.com? | lll444000.com | www.282654.com | 5004mm.com | www.pj88h.com | zun016.com | www.68058888.com | 4052l.com | www.6agcpw.com | 3550b.com | www.allcity888.com | 40661113.com | www.1117303.com | cn.man853.com | www.000xy8.com | 67888k.cc | www.063263.com | ycl888.com | www.458177.com | p76.com | www.9737qq.com | bjl1588.com | www.bet63o.com | 7811bb.com | www.y6091.com | 7893w11.com | www.1779.com? | 3957b.com | www.154405.com | 642221.com | www.80075n.com | xg9111.com | www.tx65.com | www.22xpjdc.com | www.558413.com | www.2267111.com | b00351.com | www.9053.com | 2566h4.com | www.xpj2008.co | 2004877.com | www.js18456.com | 18438v.com | www.66332f.com | 56988gg.com | www.855876.com | www.9679700.com | jl777777.com | www.35252o.com | 9697444.com | www.0055sun.com | 2146b.com | www.2373e.com | www.70.tt | x33j.vip | www.sscb3.com | vic6308.com | www.28891j.com | 44pp8331.com | www.538950.com | www.053435.com | 923510.com | www.wns123h.com | tz458.com | www.qilc8.com | www.9679u.com | 44488y.com | www.308956.com | 3685c.com | www.c5636.com | www.pj5938.com | 80892dd.com | www.73990r.com | 074r3.com | www.756059.com | www.000243.com | 18775l.com | www.68993251.com | www.k8084.com | www.029783.com | www.1168z.com | 1454445.com | www.2388cai.com | www.2257123.com | 33ydgj.com | www.zpw100.com | 3178jj.com | www.082709.com | www.604886.com | 33318.com | www.909965.com | www.520008.net | 026237.com | www.50077c.com | www.777444h.com | 933620.com | www.68993251.com | www.5554dhy.com | 8988rr.com | www.pjc44.vip | 56988gg.com | 7894f.com | www.47506y.com | 2649dd.com | 697138.com | www.006786.com | 7792f.com | js58123.com | www.637968.com | 1144011.com | 5478555.com | www.pj55713.com | 4634455.com | bet99959.com | www.fg9904.com | www.67797q.com | 1489h.com | www.26878p.com | www.mg7088.com | 78666g.com | www.c5127.com | www.a9151e.com | 11ll8332.com | www.106396.com | www.591069.com | www.1869y.com | 3435t.com | www.880085.com | www.2288078.com | 8988uu.com | www.755914.com | www.88166g.com | wfcp000111.com | 2013880.com | www.55545.com | www.yh8449.com | 3822d.com | www.660686.com | www.5446rr.com | 131iii.net | 97799k.com | www.88266d.com | www.464699.com | 7240m.com | www.027107.com | www.93919a.com | www.7830s.com | 69096.com | www.599464.com | www.45598u.com | www.amjs602.com | 3614c.com | www.927035.com | www.472707.com | 1654gg.com | 15a22.net | www.cb2588.com | www.xycp98.net | www.55123.com | feicai0431.com | www.638807.com | www.w3410.com | www.67797w.com | 66681y.com | www.221075.com | www.86333b.com | www.600w04.com | pt138.com | angei9gov.cn | www.2350m.com | www.4694j.com | www.hg098.com | 7616.com | www.267051.com | www.585167.com | www.66h6.com | 3009a.com | 10050714.com | www.589344.com | www.688sb.21.sb | www.msc83.com | 6830g.com | 6112kk.com | www.755834.com | www.yzqhyz.com | www.061626.com | zhcp91.com | 299.so | www.236844.com | www.yun1818.com | www.5559961.com | www.dz825.com | 0667.com | 14179455.com | www.ascp00.com | www.b83377.com | www.m8018.com | 2381yy.com | js8028.com | www.192722.com | www.83033g.com | www.f92776.com | www.4938i.com | mm7742.com | 914907.com | www.225065.com | www.66653q.com | www.680588.com | www.006091.com | 8905z.com | vv00558.com | 1483q.com | www.5xag.com | www.9187o.com | www.5566800.com | www.767xpj.com | j58955.com | qy228.vip | www.068631.com | www.3552d.com | www.4546300.com | www.5487.com | www.h6635.net | 4182006.com | 4995q.com | 3388558.com | www.996763.com | www.00mgm777.com | www.pj888h.com | www.6707555.com | 4634455.com | mg437722.com | dod688.com | 218.com | www.607325.com | www.55228j.com | www.32031f.com | www.q4042.com | www.2229193.com | pj268.vip | 8547e.com | rrr5144.com | 3559cccc.com | www.112819.com | www.lqc8.com | www.871453.com | www.9895d.com | www.138cpg.com | www.279765.com | www.0686000.com | h8381.com | 9068i.com | 3355vn77.com | 3009d.com | 00054066.com | www.588703.com | www.3668u.com | www.aobo196.com | www.3032dd.com | www.8863tt.com | www.665888001.com | www.4tgpd.com | www.11166638.com | js44888.com | youfa777.vip | 8344333.com | u72227.com | 80850v.com | 66876f.com | www.001562.com | www.586031.com | www.c1825.com | www.12455b.com | www.188666.com | www.4809z.com | www.704909.com | www.88266.com | www.709msc.com | www.775412.com | www.8867p.com | www.ag803.com | 6137s.net | dd5443.com | 3049z.com | 11005k.com | 563567.com | 39199o.com | 41188844.com | 9365.com | bozhongle.com | 5144r.com | 8381o.com | 3202h.com | d6688.com | 0038633.com | 2778aa.com | 08820055com | 3950l.com | 66betbet365.com | 1432.com | hd11939.com | o08199.com | xpj9411.cn | aa00558.com | 84494400.com | 1316969.com | bet365yulecheng871.org | 8722oooo.com | hgw168n.com | 1591mmm.com | 859636.com | 3552o.com | xgsaimahui.com | 30171166.com | 66287i.com | xx3336.com | 9694s.com | 00ww8332.com | 2820s.com | 8030t.com | 11422r.com | www.hg444.tw | www.yh1666.com | www.4972uu.com | www.c32126.cc | www.yz889.com | www.771671a.com | www.addbl.com | www.rycp165.com | www.5309789.com | www.540640c.com | www.38775oo.com | www.x22789.com | www.4323c.com | www.9478l.com | www.189999a.com | www.627069.com | www.088186.com | 3413366.com | 88188a.cc | 8381d.com | yh77333.com | 123hwjx.com | bb888bb888.com | www.kb8854.com | www.9679k.com | www.444510.com | www.44c668.com | www.4996yx.com | www.flb277.com | www.81678c.com | www.qucw7.com | www.461770.com | 496ee.com | 2643g.com | 9971009.com | yz5488.com | 5446y.com | www.67797o.com | www.45778.com | www.mhcp8.com | www.j83377.com | www.hg9377.com | www.595hc.com | www.401285.com | 111122ii.com | 33335002.com | 5002nnn.com | ly88888887.com | www.4938k.com | www.k8kk11.com | www.4996jc.com | www.959595.me | www.hjin5.com | www.108129.com | zunyi18.com | 31553a.com | 500000370.com | www.87680v.com | www.508345.com | www.45598w.com | www.7239t.com | www.861803.com | zz2205.com | 8520l.com | 4647d.com | www.5197365.com | www.548866.com | www.4521c.com | www.66332c.com | www.540377.com | 7779q.cc | dd01234.com | www.198488.com | www.hg6880.com | www.3066vv.com | www.81678q.com | www.436106.com | yin3939.com | 3559aa.com | www.pj6522.com | www.77365n.com | www.56011k.com | www.qbwc1.com | dzj0666.com | sjg003.com | 9411ooo.com | www.22582.com | www.vnsr4567.com | www.72gcw.com | d5959.com | qqq01234.com | 1389tt.com | www.31955.com | www.213981.com | www.6cpb.com | s2894.com | 35222g.com | www.38200a.com | www.hfcp1188.com | www.9238777.com | www.503990.com | 1216.com | 68348.com | www.xpj183.com | www.1199nsb.com | www.937016.com | 4066c.com | 2824y.net | www.hg2020y.com | www.213981.com | www.923633.com | hjqpjgj.com | 821.cc | www.9488js.com | www.570337.com | www.526650.com | xhby988.com | 8287.com | www.308076.com | www.55885m.com | 66648m.com | 11163355.com | www.kelake88.com | www.44118z.com | www.686536.com | 1005rv.com | 20774499.com | www.668cp66.com | www.16878l.com | 3983012.com | j08199.com | www.47343.com | www.55238e.com | www.36787e.com | 3522q.cc | www.hg4428.com | www.63800v.com | www.332760.com | r1915.com | www.70777.com | www.3421m.com | www.456586.com | 7508s.com | www.777444p.com | www.81508z.com | www.346411.com | jj4255.com | www.y36h.com | www.095928.com | 29918y.com | 4182.com | www.366686.com | www.88266q.com | 45637q.com | 30007k.com | www.19019p.com | www.919725.com | 00773k.com | www.7830i.com | www.11599099.com | wzyxwz.org | js75ee.com | www.97cp678.com | www.2875o.com | yun111.com | www.hg701n.com | www.blr3344.com | ky877.com | 8557t.com | www.458828.com | www.df94.com | 4694g.com | www.z47.cc | www.97714.com | js14n.com | www.ylg268.com | www.07679p.com | 49114.com | www8827.com | www.59199.com | www.339786.com | 3522kk.com | www.938n.cc | www.786587.com | 3566xx.com | www.2195777.com | www.csgc6.com | 0201.com | www.kk1778.com | www.3478l.cc | 1813l.com | www.wnsr7788.cc | www.5441i.com | 09997.com | www.yh400000.com | www.2632u.com | 30177755.com | www.08111.com | www.cly3.com | 3368.com | www.7817z.vip | www.763659.com | 73055t.com | www.1168k.com | www.399010.com | 365bet800.com | www.cn365o.com | www.43131g.com | ly88888887.com | www.23819.am | 22yy8331.com | www.d276.com | www.83033w.com | hhh01234.com | www.js1199.com | www.hqcp5.com | am126.cc | www.19yh8.com | www.50064o.com | 33313s.com | www.38358.com | 7773847.com | www.1770q.com | www.451.cc | blr01.vip | www.9737aa.me | 2127dd.com | www.38200r.com | www.88266q.com | 12274444.com | www.70852a.com | www.587639.com | 44077o.com | www.7920.com | 69096h.com | www.64566t.com | www.769211.com | 9149q.com | www.aaa06.cc | 28824t.com | www.9005b.com | www.631257.com | 3379bb.com | www.1434o.com | h21148.com | www.339788.com | www.330892.com | mm56667.com | www.99638n.com | 5566bet.vip | www.6662ylg.com | bcylc22.com | www.hy229.com | www.799436.com | 31894000.com | www.222387.com | xpj677c.com | www.808888x.com | 66876s.com | www.13658017870.com | www.901591.com | 6830w.com | www.3zq04.com | dh4515.com | www.7225v.com | 28839i.com | www.4058s.com | 9958900.com | www.qqqqkkkk.com | www.995684.com | 2613q.com | www.xinhuangguan.com | jinsha3845.com | www.535.cc | 8742p.com | www.5049q.com | 1086.com | www.569389.com | www.50788i.com | www.2288098.com |