VQuery 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package VQuery --version 1.0.5
                    
NuGet\Install-Package VQuery -Version 1.0.5
                    
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="VQuery" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VQuery" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="VQuery" />
                    
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 VQuery --version 1.0.5
                    
#r "nuget: VQuery, 1.0.5"
                    
#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 VQuery@1.0.5
                    
#: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=VQuery&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=VQuery&version=1.0.5
                    
Install as a Cake Tool

VQuery

NuGet

Lightweight ORM and Database Helper for .NET

VQuery is a lightweight, high-performance database library designed for .NET applications. It provides a simple API for working with MySQL, PostgreSQL, and SQL Server while maintaining excellent performance through ReflectionCache optimization and lightweight ORM mapping.

Supported Frameworks

  • .NET 8.0

Features

✅ MySQL Support

✅ PostgreSQL Support

✅ SQL Server Support

✅ Generic ORM Mapping

✅ Async Support

✅ Transactions

✅ Parameterized Queries

✅ ExecuteScalar<T>()

✅ ExecuteNonQuery()

✅ Query<T>()

✅ QueryFirst<T>()

✅ QuerySingle<T>()

✅ QueryMultiple()

✅ Connection Pooling

✅ ReflectionCache Optimization

✅ VariableConverter Utilities


Installation

Package Manager

Install-Package VQuery

.NET CLI

dotnet add package VQuery

Specific Version

dotnet add package VQuery --version 1.0.5

Configuration

appsettings.json

{
  "ConnectionStrings": {

    "MYSQLConnection": {
      "server": "127.0.0.1",
      "port": "3306",
      "database": "sampledb",
      "username": "root",
      "password": "123456",
      "pooling": "true",
      "minimumPoolSize": "5",
      "maximumPoolSize": "100",
      "connectionTimeout": "30",
      "commandTimeout": "60"
    },

    "POSTGREConnection": {
      "server": "127.0.0.1",
      "port": "5432",
      "database": "sampledb",
      "username": "postgres",
      "password": "123456",
      "pooling": "true",
      "minimumPoolSize": "5",
      "maximumPoolSize": "100",
      "connectionTimeout": "30",
      "commandTimeout": "60"
    },

    "SQLSERVERConnection": {
      "server": "127.0.0.1",
      "port": "1433",
      "database": "sampledb",
      "username": "sa",
      "password": "123456",
      "pooling": "true",
      "minimumPoolSize": "5",
      "maximumPoolSize": "100",
      "connectionTimeout": "30",
      "commandTimeout": "60",
      "trustServerCertificate": "true"
    }
  }
}

Quick Start

MySQL

using VQuery;

using var db = new MySQLConnection();

db.ConnectionOpen("MYSQLConnection");

var users =
    db.Query<User>(
        "SELECT * FROM users");

PostgreSQL

using VQuery;

using var db = new PostgreSQLConnection();

db.ConnectionOpen("POSTGREConnection");

var users =
    db.Query<User>(
        "SELECT * FROM users");

SQL Server

using VQuery;

using var db = new SQLServerConnection();

db.ConnectionOpen("SQLSERVERConnection");

var users =
    db.Query<User>(
        "SELECT * FROM users");

Transactions

db.Begin();

try
{
    db.Insert(
        "users",
        new Dictionary<string,string>
        {
            { "name", "John" }
        });

    db.Update(
        "users",
        new Dictionary<string,string>
        {
            { "name", "David" }
        },
        "id=1");

    db.Commit();
}
catch
{
    db.RollBack();
}

CRUD Operations

SelectDataTable

DataTable dt =
    db.SelectDataTable(
        "SELECT * FROM users");

SelectDataRow

DataRow row =
    db.SelectDataRow(
        "SELECT * FROM users WHERE id=1");

SelectDataValue

string value =
    db.SelectDataValue(
        "SELECT name FROM users WHERE id=1");

SelectDataScalar

int total =
    db.ExecuteScalar<int>(
        "SELECT COUNT(*) FROM users");

Insert

db.Insert(
    "users",
    new Dictionary<string,string>
    {
        { "name", "John" },
        { "email", "john@test.com" }
    });

Update

db.Update(
    "users",
    new Dictionary<string,string>
    {
        { "name", "David" }
    },
    "id=1");

Delete

db.Delete(
    "DELETE FROM users WHERE id=@id",
    new()
    {
        ["@id"] = 1
    });

ORM Mapping

public class User
{
    public int Id { get; set; }

    public string Name { get; set; }

    public string Email { get; set; }
}
var users =
    db.Query<User>(
        "SELECT * FROM users");

Async Support

var users =
    await db.QueryAsync<User>(
        "SELECT * FROM users");
var user =
    await db.QueryFirstAsync<User>(
        "SELECT * FROM users WHERE id=@id",
        new()
        {
            ["@id"] = 1
        });
int total =
    await db.ExecuteScalarAsync<int>(
        "SELECT COUNT(*) FROM users");

QueryMultiple

string sql =
@"
SELECT * FROM users;
SELECT * FROM roles;
";

DataSet ds =
    db.QueryMultiple(sql);

DataTable users = ds.Tables[0];
DataTable roles = ds.Tables[1];

VariableConverter

db.ToInt("100");

db.ToDouble("123.45");

db.ToString(DateTime.Now);

db.ToDate("01-01-2026");

db.NumberToText(1000);

db.NumberToTextKH(1000);

Performance

VQuery automatically uses ReflectionCache for:

  • Query<T>()
  • QueryAsync<T>()
  • QueryFirst<T>()
  • QuerySingle<T>()

Benefits:

  • Faster object mapping
  • Reduced reflection overhead
  • Lower CPU usage
  • Better scalability

GitHub

https://github.com/ravyouerm/VQuery

NuGet

https://www.nuget.org/packages/VQuery


Version 1.0.5

Added

  • PostgreSQL Support
  • SQL Server Support
  • Async Methods
  • QueryMultiple
  • ReflectionCache
  • Connection Pooling
  • ExecuteScalar<T>()
  • ExecuteNonQuery()

Improved

  • MySQL Performance
  • PostgreSQL Performance
  • SQL Server Performance
  • Documentation

Fixed

  • Dictionary<string,string> compatibility overloads
  • MySQL connection string handling
  • ORM mapping improvements

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.6 132 7/28/2026
1.0.5 135 6/23/2026