title: How to set and use connection string in C# entity framework
body: <p>My problem is the following: I want to connect to a SQL Server Express instance on a local network with my C# application; the IP is 192.168.1.147 and the SQL Server port is 1433.</p>
  
  <p>I have a code-first database running smoothly, I can connect from the PC that is hosting the service but not from another computer.</p>
  
  <p>How can I set my connection string, or where should I do it? What would be the correct format? And how should I use it in my application?</p>
  
  <p>I tried the following:</p>
  
  <pre><code>192.168.1.147\SQLEXPRESS,1433 
  192.168.1.147:1433\SQLEXPRESS 
  192.168.1.147,1433 
  </code></pre>
  
  <p>EDIT: the connection looks like this in my <code>app.config</code>:</p>
  
  <pre><code>&lt;connectionStrings&gt; 
     &lt;add name="Amnesia.Client.Properties.Settings.AMNContext" 
          connectionString="Data Source=192.168.1.147\SQLEXPRESS,1477;Initial Catalog=Amnesia.Server.Repository.AmnesiaContext;Persist Security Info=True;User ID=whatever;Password=whatever"
          providerName="System.Data.SqlClient" /&gt; 
  &lt;/connectionStrings&gt;
  </code></pre>