A network-related or instance-specific error occur

2019-09-14 21:38发布

I, am using package manager console to perform the database migration.

I used the following command

Add-Migration init

This command work perfectly and created the migration object as see in the below imagemigration image

Now I am using

Update-Database

command to create the database however I, am getting an error as shown below

error details

I have used the solution provide here and this question.

However, this solution is not working for me from visual studio.

I, am able to use the sql server from SSMS. This error is from visual studio.

Here is the firewall screen shot enter image description here

2条回答
Bombasti
2楼-- · 2019-09-14 22:11

Might be your connection to SQL is not started. Just follow below steps: 1. Go to run command or press Windows+R key and enter services.msc. 2. Find SQL Server (MSSQLSERVER) there and right click on it and click on start option. Then retry.

查看更多
成全新的幸福
3楼-- · 2019-09-14 22:33

This solution work for me.I change the statrtup.cs file as per the below repo

https://github.com/bricelam/Sample-SplitMigrations

Add migration with different assembly

查看更多
登录 后发表回答