I am writing a payroll system that will integrate with a pre-existing system. The original system had a master database that handled user management and some global configur
It is very simple. I have:
public WMSEntities() : base("name=WMSEntities") //WMSEntities is conection string name in web.config also the name of Entitiframework
{
}
already in autogenerated Model.Context.cs of edmx folder
To connect to multiple database in runtime, I created another constructor that takes connection string as parameter like below in same file Model.Context.cs
public WMSEntities(string connStringName)
: base("name=" + connStringName)
{
}
Now I added other connection string in Web.Config for example