Entity Framework caches the connection string, there is no way to force the update.
From in this article : the connection string specified in the DbContext constructor is not cached, you can use this as a workaround:
public class MyContext : DbContext { public MyContext() : base(ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString) { } }
source share