Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.4 KB

File metadata and controls

46 lines (31 loc) · 1.4 KB

MVFC.SQLCraft.MsSQL

🇧🇷 Leia em Português

CI codecov License Platform NuGet Version NuGet Downloads

Driver for Microsoft SQL Server access using [MVFC.SQLCraft] and Microsoft.Data.SqlClient.

Installation

dotnet add package MVFC.SQLCraft.MsSQL

Features

  • Secure connection with SQL Server
  • Integration with SqlKata
  • Support for .NET 9.0+

Example

using MVFC.SQLCraft.MsSQL;

MsSQLCraftDriver _driver = new(connectionString);

driver.Execute("IF OBJECT_ID('dbo.Persons', 'U') IS NULL CREATE TABLE Persons (Id INT IDENTITY(1,1) PRIMARY KEY, Name NVARCHAR(100) NOT NULL);");

var insertQ = new Query("Persons")
                    .AsInsert(new 
                    { 
                        Name = "Alice" 
                    });

var affected = driver.Execute(insertQ);

License

MIT