Jun 26, 2018 10:14 AM|urza.cc|LINK
Hello, I have two SQL databases, each with code first EF 6.x context.
I would like to merge these 2 databases into one database (containing data from both (tables have different names)), and preserve 2 separate independent existing 'code first' db contexts. Both contexts have some existing migrations and are in fact in different
applications (one is mvc, one is web api).
Has anyone done this before?
Databases are on Azure as SQL Server databases.
I used Visual Studio SQL object explorer to "extract data-tier application" to save schema and data from one db into local file and then with "publish data-tier application" I pushed that to the second database. Now I have database with tables and data from
both databases, so far so good.
Then I copied the missing migrations from first database to second co the migration table contains rows from both databases.
Now when I run one application (web api) it is running just fine, but the other one (mvc) ends on exception seemingly the first time it is trying to access data. It ends on a rather unhelpful exception: "A task was canceled."
What am I missing? Is there anything else I need to do? Has anyone done this before? How can I get some better exception with better description?