Using Microsoft SQL Server on Windows

Microsoft offers various editions of its SQL Server product. We will use a free version that can run stand-alone, known as LocalDb. The latest version of LocalDb is installed as part of Visual Studio 2017.

Note

Microsoft SQL Server used to be a Windows-only RDBMS. In 2017, Microsoft plans to release a version for Linux that will be great for cross-platform .NET Core developers. A preview is available, but we will not cover it in this book.

Connecting to Microsoft SQL Server LocalDb

When you write code to connect to a SQL Server database, you need to know its server name. The name depends on the version you choose to use. Here are some examples:

  • Visual Studio 2017 installs SQL Server 2016: (localdb)\mssqllocaldb ...

Get C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.