title: I'm unable to connect to my local SQL Server
body: <p>I am trying to connect to my SQL Server local database:</p>
  <pre><code>builder.Services.AddDbContextPool&lt;UserDbContext&gt;(options =&gt;
  {
          options.UseSqlServer(builder.Configuration.GetConnectionString(&quot;ConnectionString&quot;), o =&gt;
          {
                 o.EnableRetryOnFailure();
          });
  });
  </code></pre>
  <p>API controller:</p>
  <pre><code>[ApiController]
  [Route(&quot;[controller]&quot;)]
  public class UserController : Controller
  {
      private readonly UserDbContext userDbContext;
  
      public UserController(UserDbContext dbContext) =&gt; userDbContext = dbContext;
  
      [HttpGet]
      [Route(&quot;all&quot;)]
      public ActionResult&lt;IEnumerable&lt;User&gt;&gt; GetAllUsers()
      {
          IEnumerable&lt;User&gt; allUsers = userDbContext.Users;
          return Ok(allUsers);
      }
  }
  </code></pre>
  <p>And here is my connection string:</p>
  <pre><code>&quot;ConnectionString&quot;: &quot;server=(localdb)\\MSSQLLocalDB;Database=todoapp;User ID=todouser;Password=1234&quot;
  </code></pre>
  <p>Now, when I am trying to send GET request, I get response:</p>
  <blockquote>
  <p>Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'todouser'.</p>
  </blockquote>
  <p>With SQL Server Management Studio, I can connect to the database without any problems. Server authentication is set to: &quot;SQL Server and Windows authentication mode&quot;, but I cannot connect with Windows authentication as well.</p>