Archive for category Ado.net entity framework
there are key scenarios in which you want to create your connection string at runtime (dynamically), instead of old Connectionstring Ado.net entity framework uses "EntityConnection" string
now how one will proceed if he wants to create EntityConnection at runtime say read from configuration and then use it or in case of DDR (data dependent routing) here is the solution that will save you from this trouble.
- Create Instance of EntityConnectionStringBuilder
- Assign it the "SQL Connection String"
- provide the meta data
- Assign the provider name
- then all you have to request EntityConnectionStringBuilder to return value from ToString();
- and you are good to go 🙂