One possible way is to do it the following way: How to change the connection string in the EntityFramework? [^].
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)