首页 > 移动平台 > 详细

ASP.NET ZERO Core Application 学习笔记

时间:2016-09-13 16:12:43      阅读:616      评论:0      收藏:0      [点我收藏+]

地址:https://www.aspnetzero.com/Documents/Development-Guide-Core

1.恢复数据库

MIGRATOR CONSOLE APPLICATION

AspNet Zero includes a tool, Migrator.exe, to easily migrate your databases. You can run this application to create/migrate host and tenant databases.

技术分享

This application gets host connection string from it‘s own appsettings.json file. It will be same as in the appsettings.json in .Web project at the beggining. Be sure that the connection string in config file is the database you want. After getting host connection sring, it first creates the host database or apply migrations if it does already exists. Then it gets connection strings of tenant databases and runs migrations for those databases. It skips a tenant if it has not a dedicated database or it‘s database is already migrated for another tenant (for shared databases between multiple tenants).

You can use this tool on development or on product environment to migrate databases on deployment, instead of EntityFramework‘s own Migrate.exe (which requires some configuration and can only work for single database in one run).

 

ASP.NET ZERO Core Application 学习笔记

原文:http://www.cnblogs.com/fanxingthink/p/5868705.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!