ForgeORM.QueryBuilder 1.3.1

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

ForgeORM

High-performance next-generation .NET ORM combining the power of raw SQL, native ADO.NET speed, EF Core-style developer experience, compile-time safety, dynamic query generation, schema artifacts, split-query relationship loading, and advanced database tooling.


Vision

ForgeORM is designed to become:

  • Faster than EF Core
  • More developer friendly than lightweight SQL wrappers
  • SQL-first without losing type safety
  • Database transparent
  • IDE-aware
  • Multi-database
  • Enterprise-ready
  • Cloud-native
  • AI-assisted
  • Compile-time optimized

ForgeORM provides:

  • Raw SQL execution
  • Strongly typed query AST
  • Dynamic query builder
  • Stored procedures
  • Functions
  • Bulk operations
  • Split query relationship loading
  • Artifact management
  • Query visualization
  • Query analytics
  • Smart pagination
  • Optional filtering
  • Dynamic search APIs
  • Automatic schema history
  • Future Roslyn + Source Generator support

Supported Databases

Database Support
SQL Server
SQL Express
PostgreSQL
MySQL
Oracle
SQLite

Core Philosophy

ForgeORM supports ALL development styles:

Style Supported
Raw SQL
Raw SQL-native
EF-like expressions
Dynamic query builder
AST query builder
Stored procedures
Functions
Views
Temp tables
CTEs
Split queries
Bulk operations

Installation

dotnet add package ForgeORM.SqlServer
dotnet add package ForgeORM.PostgreSql
dotnet add package ForgeORM.MySql
dotnet add package ForgeORM.Oracle


# Configuration

```bash
{
  "ConnectionStrings": {
    "DefaultConnection": "Data Source=<DatabaseServer>;Initial Catalog=ForgeOrmDb;Integrated Security=True;TrustServerCertificate=True;"
  }
}

# Installation

```csharp

builder.Services.AddForgeOrm(options =>
{
    options.UseSqlServer(
        builder.Configuration.GetConnectionString("DefaultConnection"));

    options.EnableQueryLogging();
    options.EnableQueryAnalytics();
    options.EnableArtifactHistory();
});


Quick Start
```csharp
var products = await db.QueryAsync<Product>(
    "SELECT * FROM Products WHERE Price > @Price",
    new { Price = 100 });

AST Query Builder

var query = ForgeSql
    .Select<Product>()
    .From("Products p")
    .LeftJoin<Category>((p, c) => p.CategoryId == c.Id)
    .Columns(
        "p.Id",
        "p.Name",
        "p.Price",
        "c.Name AS CategoryName")
    .Where(x => x.Price > 100)
    .OrderByDescending(x => x.Id)
    .Take(20)
    .Render(db.ProviderName);

Universal Search API

var result = await db.Search<Product>()
    .Where(x => x.Price >= minPrice)
    .WhereIf(categoryId != null,
        x => x.CategoryId == categoryId)
    .Page(page, pageSize)
    .ToPagedAsync();

Bulk Operations

await db.BulkInsertAsync("Products", rows);

await db.BulkUpdateAsync(
    "Products",
    rows,
    x => x.Id);

await db.BulkDeleteAsync<Product>(
    x => ids.Contains(x.Id));

Split Query Loading

var customers = await db.SplitGraph<Customer>()
    .IncludeMany<Order, int>(
        ids => "SELECT * FROM Orders WHERE CustomerId IN @Ids",
        c => c.Id,
        o => o.CustomerId,
        (c, orders) => c.Orders = orders.ToList())
    .ToListAsync("SELECT * FROM Customers");

Artifact System

var artifact = ForgeSql
    .Select<Product>()
    .From("Products")
    .AsView("vw_ProductList")
    .Render(db.ProviderName);

Swagger

https://localhost:5001/swagger

Philosophy ForgeORM is: SQL-first strongly typed performance-first transparent enterprise-grade future-ready Author Developed by Raheel Ahmed

V2/V3 Enterprise + AI Modules Update

This package now includes additive implementations for:

  • Redis/distributed query caching with memory fallback
  • Telemetry and monitoring snapshots
  • SQL security validation, data masking and AES column encryption helpers
  • Vector search with cosine similarity and SQL Server/PostgreSQL SQL generation helpers
  • AI query optimization
  • AI diagnostics
  • AI Minimal API code generation
  • AI migration planning
  • Studio API for query visualization, ERD, API testing, SaaS tenants and monitoring
  • React Studio shell under studio/ForgeORM.Studio.Web

See docs/V2-V3-IMPLEMENTED-MODULES.md.

V4 Platform Modules Added

See docs/V4-PLATFORM-MODULES-IMPLEMENTED.md. Added RAG, workflow engine, event sourcing, realtime, AI agents, low-code ERP generator, cloud/IaC generator, identity policy engine, offline sync, marketplace, data virtualization, time travel, AI observability and AI memory.

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 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on ForgeORM.QueryBuilder:

Package Downloads
ForgeORM.AspNetCore

ASP.NET Core dependency injection integration for ForgeORM.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.7 30 5/20/2026
1.3.6 65 5/19/2026
1.3.5 102 5/17/2026
1.3.4 105 5/16/2026
1.3.3 104 5/16/2026
1.3.2 113 5/15/2026
1.3.1 107 5/15/2026
1.3.0 115 5/14/2026
1.2.0 96 5/14/2026
1.1.0 97 5/14/2026
1.0.2 98 5/14/2026
1.0.1 110 5/13/2026
1.0.0-preview.1 49 5/12/2026