LtQuery 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package LtQuery --version 1.0.0
NuGet\Install-Package LtQuery -Version 1.0.0
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.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LtQuery --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LtQuery, 1.0.0"
#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.0.0 // Install LtQuery as a Cake Tool #tool nuget:?package=LtQuery&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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 | 283 | 12/11/2023 |
1.2.1 | 204 | 12/8/2023 |
1.2.0 | 167 | 12/6/2023 |
1.1.1 | 197 | 12/3/2023 |
1.1.0 | 193 | 12/3/2023 |
1.0.4 | 197 | 12/1/2023 |
1.0.3 | 191 | 11/30/2023 |
1.0.2 | 185 | 11/29/2023 |
1.0.1 | 204 | 11/29/2023 |
1.0.0 | 179 | 11/27/2023 |
0.5.3 | 174 | 11/25/2023 |
0.5.2 | 176 | 11/25/2023 |
0.5.1 | 166 | 11/25/2023 |
0.4.0 | 164 | 11/18/2023 |
0.3.2 | 167 | 11/17/2023 |
0.3.1 | 157 | 11/16/2023 |
0.3.0 | 161 | 11/8/2023 |
0.2.1 | 156 | 11/4/2023 |
0.2.0 | 150 | 11/1/2023 |