I need to set my Entity Framework connection string at runtime. Right now, I have the following:
string connectionString = \"metadata=res://*/DataModels.Cust
I know this was asked 10 months ago, but I found an easier way to specify the connectionString:
If your config file has it as:
You can specify it as -
public const string ConnectionString = @"name=CustomerDataModel";
..
CustomerDBContext context = new CustomerDBContext(ConnectionString );
No need to worry about quotes. Lot cleaner.