Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to access sql-server from MVC6 (WebApi) over SQLClient?

$
0
0

For new webservice-project, I want to use MVC6 (WebApi).

I work with Microsoft Visual Studio Professional 2015, Version 14.0.24720.00 Update 1, ASP.NET and Webtools 2015 (RC) 14.1.11116.0

Since two full day's now, I try to get the access to SQL-Server (over SqlClient) working and found only a small piece of (and different) information's on the internet.

I have added the NuGet: System.Data.SqlClient (4.0.0.0.beta-23516)(latest available version) and added:

using System.Data.SqlClient;

The result is, that some objectes like SqlCommand and SqlConnection are known, but other important objects like DataTable and SqlDataAdapter arenot found.

So my question:

- What do I have to do, to be able to access the SQL server from MVC6 WebApi?

Thanks for a fast answer.

Note: I found a similar (older) problem description here:

http://forums.asp.net/t/2064318.aspx?Could+not+get+reference+of+System+Data+in+Asp+Net+5


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>