JonathanR33D
JonathanR33D

Reputation: 103

Using ADO.NET in UWP apps possible?

I am trying to use ADO.NET so that my C# UWP app can access my Azure SQL database but when I try to refer to "System.Data.SqlClient", it is not readily available. I tried importing the "System.Data.dll" file but that led to a new host of errors.

I'm being led to believe that ADO.NET is not compatible with UWP apps. The problem with that is that I can't find another technology that will allow me to work with my Azure SQL database. Am I missing something here?

Upvotes: 0

Views: 1683

Answers (2)

Praveen
Praveen

Reputation: 33

Latest UWP platform offers connectivity to SQl Server . Please refer https://learn.microsoft.com/en-us/windows/uwp/data-access/sql-server-databases

Upvotes: 0

Sébastien Pertus
Sébastien Pertus

Reputation: 715

The best way to handle this is to create a full web api solution. So, at the end, you will have

  1. An Azure SQL Database
  2. A Web API website , which will expose your datas in a JSON format. Using Entity Framework is not mandatory but can help in some way :)
  3. An UWP application which will request your Web API endpoints

You will find here a complete solution : http://www.asp.net/web-api/overview/data/using-web-api-with-entity-framework/part-1

Upvotes: 1

Related Questions