title: What's the alternative to DataTable with ADO.NET under MVC 6?
body: <p>I am creating a MVC 6 project and I would rather use Classic ADO.net over Entity Framework 7. However It is saying that name space can not be found for both <code>DataTable</code> and <code>SqlDataAdapter</code>. I have a using <code>System.Data</code> and <code>System.Data.SqlClient</code> statement. It dose not show an error until I try to build the project. </p>
  
  <p>I think I read somewhere that those two names spaces are not implemented in the new version. If so is there an alternative way of doing it or am I missing a dependency or using statement?</p>
  
  <p>code:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public static DataTable GetLog(string appName)
  {
      DataTable table = new DataTable("ApplicationLog");
      SqlDataAdapter da = null;
  
      using (SqlConnection conn = DB.GetSqlConnection())
      {
          SqlCommand cmd = new SqlCommand("select * from ApplicationLog where application_name = @appname", conn);
          cmd.Parameters.Add(new SqlParameter("appname", System.Data.SqlDbType.NVarChar, 100));
          cmd.Parameters["appname"].Value = appName;
  
  
          da = new SqlDataAdapter(cmd);
  
          int res = da.Fill(table);
      }
  
      return table;
  }
  </code></pre>
  
  <p>my project.json</p>
  
  <pre><code>{
      "userSecretsId": "aspnet5-ASPDemo-b25bb1cc-00e6-401e-9f49-5b59c08a030f",
      "version": "1.0.0-*",
      "compilationOptions": {
          "emitEntryPoint": true
      },
  
      "dependencies": {
          "Bestro": "1.0.0-*",
          "EntityFramework.Core": "7.0.0-rc1-final",
          "EntityFramework.Commands": "7.0.0-rc1-final",
          "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
          "Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1",
          "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
          "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
          "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final",
          "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
          "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
          "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
          "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
          "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
          "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
          "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
          "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
          "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
          "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
          "Microsoft.Extensions.Logging": "1.0.0-rc1-final",
          "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
          "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
          "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
          "DataTables.AspNet.AspNet5": "2.0.0-beta2"
      },
  
      "commands": {
          "web": "Microsoft.AspNet.Server.Kestrel",
          "ef": "EntityFramework.Commands"
      },
  
      "frameworks": {
          "dnx451": {
              "frameworkAssemblies": {
                  "System.configuration": "4.0.0.0",
                  "System.Data": "4.0.0.0"
              }
          } 
      },
  
      "exclude": [
          "wwwroot",
          "node_modules"
      ],
      "publishExclude": [
          "**.user",
          "**.vspscc"
      ],
      "scripts": {
          "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
      }
  }
  </code></pre>
  
  <p>I ended up trying a lot of different components in order to try to get it complied. If there are use references please let me know.</p>