title: How to connect to SQL server database from a Windows 10 UWP app
body: <p>I'm trying to connect to an on-prem MS SQL database from a universal windows app. I'm making a LOB app using UWP, to support desktop, tablet and mobile use. When trying to connect to a local (intranet) SQL server database, I'm used to using an instance of <a href="https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection(v=vs.110).aspx" rel="noreferrer">SqlConnection</a> to connect to a local server, but since SqlConnection is not included in the .NET subset used in UWP, how is this done when using UWP?</p>
  
  <p>I've looked over the <a href="https://github.com/microsoft/windows-universal-samples" rel="noreferrer">official Microsoft samples</a> as well as the <a href="https://msdn.microsoft.com/library/windows/apps/xaml/mt244352.aspx" rel="noreferrer">how-to guides</a>, and found nothing there about database connection that is not an Azure database. <a href="https://msdn.microsoft.com/en-us/library/windows/apps/system.data.common.dbconnection.aspx" rel="noreferrer">DbConnection</a> seemed like it could be a good way to go, but can't be used since it's abstract, and it's children (for instance <a href="https://msdn.microsoft.com/en-us/library/windows/apps/system.data.sqlclient.sqlconnection.aspx" rel="noreferrer">Data.SqlClient.SqlConnection</a>) does not seem to be included in the .NET subset for UWP.</p>
  
  <p>Am I missing something super obvious here? As an aside, does anyone know a good namespace reference for UWP?</p>
  
  <p>Edit for non-duplicate: The linked question suggested as a duplicate is for Windows 8/8.1 apps, and while there are some similarities, the code in the accepted answer for that question won't work on UWP. The principle is the same, however, but there should be a better technical reference for Windows 10 apps build with UWP.</p>