Windows 10 Universal Access to SQL Server Applications

I am trying to create a universal Windows application (UWP) and I need to access SQL Server.

As I know

  • System.Data.SqlClient is not available.
  • Entity Framework 7 does not yet support UWP.

Do I need a job level?

+8
win-universal-app
source share
3 answers

Yes, an official level is required. Here is an example: How to access data from a SQL Server database in Windows 10 UWP

I wonder if this can change in view of .NET Core support for EF and ADO.NET and the comments from this page: EF Core1 in UWP (focus):

Currently, EF only supports SQLite on UWP. A detailed step-by-step guide to installing Entity Framework Core 1 and creating models is available on the Getting Started on the Universal Windows Platform page.

I believe that the main problem with UWP in this matter is the processing of input, layout and rendering in a unified form - a serious problem for the device families that it wants to support. SQLite is fairly widely supported and secure; otherwise, they seem to have gone down to data / REST services, which are also quite widely accepted.

+1
source share

Yes, you need a service level. Unable to connect UWP application and SQL Server directly.

Why this is not possible:

  • UWP applications are applications created for distribution from the store. It is not safe to store the connection string on the client computer.
  • You cannot update all client applications in one moment if you find an error. Service updates are much simpler and faster.

The easiest way to create a cloud service is to create an Azure Mobile App and connect your UWP application to the SQL Server cloud database using it.

Only for MySQL databases is it possible to directly connect the UWP application to the database using Connector / Net But this is not recommended for connecting a mobile application and a database

0
source share

Publish this answer as things change since the last update.

Starting with the Fall Developer Update (SDK 16299), UWP supports .NET Standard 2.0. This leads SqlClient to UWP and allows you to query SQL Server directly.

There was an Ignite session on this subject ( video , source ), and there are several blog posts that give you a step-by-step guide to do this.

0
source share

All Articles