linq2mssql 1.0.0

Requires NuGet 2.12 or higher.

dotnet add package linq2mssql --version 1.0.0
                    
NuGet\Install-Package linq2mssql -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="linq2mssql" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="linq2mssql" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="linq2mssql" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add linq2mssql --version 1.0.0
                    
#r "nuget: linq2mssql, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package linq2mssql@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=linq2mssql&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=linq2mssql&version=1.0.0
                    
Install as a Cake Tool

linq2mssql

A lightweight MSSQL Query Helper for .NET applications. Provides SQL query builders, connection string utilities, and a quick reference output for SQL Server and ASP.NET development — directly in your Visual Studio Output window.

Compatible with all Visual Studio versions (2010, 2012, 2013, 2015, 2017, 2019, 2022) and .NET Framework 3.5 and above.


Installation

Package Manager Console:

Install-Package linq2mssql

NuGet CLI:

nuget install linq2mssql

.NET CLI:

dotnet add package linq2mssql

Usage

using Linq2MsSql;

// Prints to Visual Studio Output window (Debug pane) and Console
QueryHelper.PrintReference();

// Or get it as a string
string ref = QueryHelper.GetReference();

Tip: To see output in Visual Studio go to View → Output and select Debug from the dropdown. Run with F5 (Debug mode).


Query Builders

using Linq2MsSql;

// Generate INSERT query
string insert = QueryHelper.Insert("Student", "Id", "Name", "City");
// INSERT INTO Student (Id, Name, City) VALUES (@Id, @Name, @City)

// Generate SELECT query
string select = QueryHelper.Select("Student", "City");
// SELECT * FROM Student WHERE City = @City

// Generate UPDATE query
string update = QueryHelper.Update("Student", "Name", "Id");
// UPDATE Student SET Name = @Name WHERE Id = @Id

// Generate DELETE query
string delete = QueryHelper.Delete("Student", "Id");
// DELETE FROM Student WHERE Id = @Id

// Generate connection string
string conn = QueryHelper.ConnectionString("CollegeDB", @"localhost\SQLEXPRESS");
// Data Source=localhost\SQLEXPRESS;Initial Catalog=CollegeDB;Integrated Security=True

// Generate Web.config block
string config = QueryHelper.WebConfigConnectionString("MyCon", "CollegeDB", @"localhost\SQLEXPRESS");

Compatibility

Target Support
.NET Framework 3.5 ✅
.NET Framework 4.0 ✅
.NET Framework 4.5+ ✅
Visual Studio 2010+ ✅

License

MIT © 2025 follyflower34

Product Compatible and additional computed target framework versions.
.NET Framework net35 is compatible.  net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 3.5

    • No dependencies.
  • .NETFramework 4.0

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 211 6/17/2026

1.0.0 - Initial release.
     - QueryHelper.Insert / Select / Update / Delete / CreateTable
     - QueryHelper.ConnectionString / WebConfigConnectionString
     - QueryHelper.PrintReference() — outputs SQL Server and ASP.NET reference to Debug Output window
     - QueryHelper.GetReference() — returns reference as string
     - Targets: .NET 3.5, 4.0, 4.5+