VQuery 1.0.5
See the version list below for details.
dotnet add package VQuery --version 1.0.5
NuGet\Install-Package VQuery -Version 1.0.5
<PackageReference Include="VQuery" Version="1.0.5" />
<PackageVersion Include="VQuery" Version="1.0.5" />
<PackageReference Include="VQuery" />
paket add VQuery --version 1.0.5
#r "nuget: VQuery, 1.0.5"
#:package VQuery@1.0.5
#addin nuget:?package=VQuery&version=1.0.5
#tool nuget:?package=VQuery&version=1.0.5
VQuery
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
Links
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 | Versions 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. |
-
net8.0
- Microsoft.Data.SqlClient (>= 7.0.1)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- MySql.Data (>= 8.4.0)
- Npgsql (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.