fanliang11 / surging

Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
MIT License
3.24k stars 923 forks source link

EFCORE code first 无法迁移数据库(MySQL) #300

Open JiangJiaqi90 opened 5 years ago

JiangJiaqi90 commented 5 years ago

具体操作步骤如下: 新建dal层.netcore 项目,安装nuget如下 image 新建DBContext 文件 image 新建控制台项目ServerHost,设为启动项目,并且引用dal,配置好相关配置文件,startup添加 image 打开程序包管理控制台,迁移数据库 add-migration init 报错: image 同样的方式,新建.netcore webapi项目就能正常迁移,但是用了您的serverHost项目就不行,求解?

fanliang11 commented 5 years ago

DbContextOptions这是asp.net core 写法,请使用AppConfig.GetSection

JiangJiaqi90 commented 5 years ago

image 两种方式都能取到配置信息,但是迁移的时候依然报同样的错啊