title: Set EF 6 connection string dynamically
body: <p>I've seen quite a few posts about this but I don't understand how to implement this. </p>
  
  <p>My connection string is specified as "MealsContext" in app.config, My EF datamodel container name is "MealsContext", how can I use an instance of MealsContext but define the connection string to be used at runtime? If I create a new EntityConnection it doesn't know what entity objects are in the model, e.g. this is what I'm currently doing...</p>
  
  <pre><code>    private MealsContext context = new MealsContext();
  
  public void InsertOrUpdate(Meal _entity)
          {
              context.Entry(_entity).State = _entity.Id == default(int) ? EntityState.Added : EntityState.Modified;
              context.SaveChanges();
          }
  </code></pre>