Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't support multiple connectionStrings in app.config #56

Open
jlrouzies-mantu opened this issue Aug 15, 2024 · 0 comments
Open

Doesn't support multiple connectionStrings in app.config #56

jlrouzies-mantu opened this issue Aug 15, 2024 · 0 comments

Comments

@jlrouzies-mantu
Copy link

Hello,

When having multiple connection strings, despite taking the good one at the DbContext initialization, and have the GET actions to work well, some how this Repository system was not taking the good connection string when doing a Save:

  public void Save(Entity entity)
  {
      entity.ObjectState = ObjectState.Modified;
      _context.SyncObjectState(entity);
      _context.SaveChanges();
  }

Even if the _context object points to the proper one.

After testing, I realized it takes the first connectionString in the list, regardless of any DbContext configuration.

This is pretty bad to be honest. Can it be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant