title: Connection string in DBContext
body: <p>I want to add connection string in dbcontext file not in App config file because of security and multiple databases.i m using npgsql (.net provider for postgresql database).
  here is my coding.</p>
  
  <pre><code> public partial class ADBEntities : DbContext
      {
          public ADBEntities()
          {
              Npgsql.NpgsqlConnectionStringBuilder ssb = new NpgsqlConnectionStringBuilder();
              ssb.Host = "localhost";
              //ssb.Port = 5432;
              ssb.UserName = "postgres";
              ssb.Password = "a5xxx";
              ssb.Database = "adb";
              ssb.CommandTimeout = 30;
              ssb.Pooling = true;
              ssb.MaxPoolSize = 20;
              ssb.MinPoolSize = 1;
              ssb.PreloadReader = true;
              ssb.IntegratedSecurity = true;
  
              var cond= new NpgsqlConnection(ssb);
              this.Database.Connection.ConnectionString = cond.ConnectionString;
          }
  }
  </code></pre>
  
  <p>But it is not working and giving error "Keyword "Port" is not supported.</p>