title: Raw SQL in .NET Core
body: <p>I have this problem: I need to execute raw SQL from my .NET Core app. So I have this code</p>
  
  <pre><code>var sqlConnection1 = new SqlConnection("Server=(localdb)\\mssqllocaldb;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true");
  var cmd = new SqlCommand
  {
      CommandText = "SELECT * FROM dbo.Candidates WHERE id = " + model.CandidateId,
      CommandType = CommandType.Text,
      Connection = sqlConnection1
  };
  
  sqlConnection1.Open();
  var wantedRow = cmd.ExecuteReader();
  sqlConnection1.Close();
  </code></pre>
  
  <p>I can't access the data in wantedRow...
  (When I use Entity Framework this query works, but I can't use Entity Framework). Is it possible in .NET Core?</p>