Skip to content

Database Constructor Alternates

AZDeveloper777 edited this page Apr 26, 2020 · 3 revisions

Using .NET Core you will have to specify your constructor like the following. Noting here that SqlServer2012 doesn't mean it won't work on Sql Server 2016 but that the this is the minimum syntax supported version.

var db = new Database("server=${servername};database=${databasename};user id=${userid};password=${password}", 
    DatabaseType.SqlServer2012, 
    System.Data.SqlClient.SqlClientFactory.Instance);