1
Hello, I have a Solution that I am implementing the DDD architecture with Entityframework, Migrations and SQL Server! However I am not able to connect to my local database when performing the command of Migrations: 'Updata-database'! I believe that only with Connectionstring inserted in the API Webconfig can I make this connection. Is that right? or I have to make another configuration in the DDD?
Currently my Connectionstring is as follows:
<connectionStrings>
<add name="BWSDatabase"
connectionString="Server=localhost;
Database=BWSDatabase;
Data Source=DESKTOP-PTI280V;
Integrated Security=True;
Connect Timeout=30;
Encrypt=False;
TrustServerCertificate=False;
ApplicationIntent=ReadWrite;
MultiSubnetFailover=False"
providerName="System.Data.SqlClient" />
</connectionStrings>
This way the tables are generated locally in a SLQ Server express booth in SQL Server Object Explorer, as well as the photo below...
I’m using the layer DDD, which are: 1-Services (API Layer) 2- Application (Development Layer) 3- Domain 4- Below (Layer where Migrations is located)
I am running the command from 'Package Manager Console', and only the tables are generated, and if you run again the command displays the message that there is no update in Migrations
Thank you in advance.
Are you doing multilayered development? If so, you have how to add to the question the layers you are using and where is the layer where the layers are
migrations
?. You executed the command bypackage manager console
?, if yes, you can add the question tostack
generated?– Barbetta
I’m sorry, I didn’t understand one thing, on top you say you can’t generate the bank, on the bottom you say the tables are generated, the problem is not clear :X
– Barbetta
The problem is that tables are generated in the localDb SQL Server Express and not in the SQL Server database itself
– Guilherme Nunes