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?