0

I am trying to create a .NET core application that connects to multiple databases.

I need 2 different context, one of them will connect to a database and the other context has to connect to multiple databases (with the same schemma).

I've created both context but i have problems chaning the connection string for the second context.

Ex: I have an api mehtod that recieve the ID of a product and i have to search that product with the first context and then, depending on the token, update that product on a specific database on the second context

2

1 Answer 1

0

You can take two-parameter in DBcontext class.

Check this out:

Connect multiple Databases to .NET core project via Entity Framework Core

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.