LtQuery 1.2.2

dotnet add package LtQuery --version 1.2.2
NuGet\Install-Package LtQuery -Version 1.2.2
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="LtQuery" Version="1.2.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LtQuery --version 1.2.2
#r "nuget: LtQuery, 1.2.2"
#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.
// Install LtQuery as a Cake Addin
#addin nuget:?package=LtQuery&version=1.2.2

// Install LtQuery as a Cake Tool
#tool nuget:?package=LtQuery&version=1.2.2

LtQuery

About

LtQuery is a ORM focus on Easy-to-use and high performance

LtQuery does not accept the input of SQL which is a string. Instead, call giving a diverty, tiny query object.

How to Use

// setup DI Container
var collection = new ServiceCollection();
collection.AddLtQuerySqlServer(new ModelConfiguration(), _ => new SqlConnection(/*ConnectionString*/));
var provider = collection.BuildServiceProvider();

using(var scope = provider.CreateScope())
{
	// get ILtConnection
	var connection = scope.ServiceProvider.GetRequiredService<ILtConnection>();

	// create query object
	var query = Lt.Query<Blog>()
		.Include(_ => _.Posts)
		.Where(_ => _.UserId == Lt.Arg<int>("UserId"))
		.OrderBy(_ => _.Date).Take(20);

	// execute query
	var blogs = connection.Select(query, new { UserId = 5 });

	// Write using Unit of Work
	using (var unitOfWork = connection.CreateUnitOfWork())
	{
		var blog = blogs[0];
		blog.Title = "NewTitle";
		unitOfWork.Update(blog);

		// Write
		unitOfWork.Commit();
	}
}

Install

Case using SQL Server.

dotnet add package LtQuery.SqlServer

Case using MySQL/MariaDB.

dotnet add package LtQuery.MySql

Case using SQLite.

dotnet add package LtQuery.Sqlite
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on LtQuery:

Package Downloads
LtQuery.Relational

a high performance mapper for .Net

LtQuery.Sql

a high performance mapper for .Net

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.2 220 12/11/2023
1.2.1 141 12/8/2023
1.2.0 116 12/6/2023
1.1.1 145 12/3/2023
1.1.0 150 12/3/2023
1.0.4 154 12/1/2023
1.0.3 144 11/30/2023
1.0.2 142 11/29/2023
1.0.1 152 11/29/2023
1.0.0 129 11/27/2023
0.5.3 144 11/25/2023
0.5.2 141 11/25/2023
0.5.1 124 11/25/2023
0.4.0 126 11/18/2023
0.3.2 129 11/17/2023
0.3.1 122 11/16/2023
0.3.0 120 11/8/2023
0.2.1 121 11/4/2023
0.2.0 112 11/1/2023