Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 832 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 832 Bytes

SqlAlias

Build status

SqlAlias applies alias definitions from the registry to the server portion of a Microsoft SQL Server connection string. Unlike full framework applications, .NET Core apps and websites do not do this by default.

The code is based on user2771704's StackOverflow answer.

Usage

Install the SqlAlias package from NuGet

using SqlAlias;

myConnectionString = Aliases.Map(myConnectionString)

Changes are only made to the connection string if the OS is Windows and if it is running on the .NET Core runtime.