DevelopmentHelpers.QueryBuilder
2.0.3
dotnet add package DevelopmentHelpers.QueryBuilder --version 2.0.3
NuGet\Install-Package DevelopmentHelpers.QueryBuilder -Version 2.0.3
<PackageReference Include="DevelopmentHelpers.QueryBuilder" Version="2.0.3" />
paket add DevelopmentHelpers.QueryBuilder --version 2.0.3
#r "nuget: DevelopmentHelpers.QueryBuilder, 2.0.3"
// Install DevelopmentHelpers.QueryBuilder as a Cake Addin #addin nuget:?package=DevelopmentHelpers.QueryBuilder&version=2.0.3 // Install DevelopmentHelpers.QueryBuilder as a Cake Tool #tool nuget:?package=DevelopmentHelpers.QueryBuilder&version=2.0.3
DevelopmentHelpers.QueryBuilder
DevelopmentHelpers.QueryBuilder is a common library which can be used for database queries .
Installation
Use the package manager pip to install DataTransfer.QueryBuilder.
NPM install DevelopmentHelpers.QueryBuilder
Usage
"QueryBuilderOptions": { "SqlDataStoreOptions": { "ConnectionString": "Server=.;Database=Northwind_QueryBuilder_Test;Trusted_Connection=True;Encrypt=True;TrustServerCertificate=True;Connect Timeout=20000; pooling='true'; Max Pool Size=20000" } } Services.AddQueryBuilder(configuration); //Used Keyed service IDataStoreHelper dataStoreHelper = (IDataStoreHelper)KernelMapper.ServiceProvider.GetKeyedService(typeof(IDataStoreHelper),QueryBuilderConstants.MsSql); //or use [FromKeyedServices]
- Create Query Query query = new() { Name = "Name", QueryType = QueryBuilder.Helpers.Enums.QueryType.Select, Statement = select, DataProviderType = QueryBuilder.Helpers.Enums.DataProviderType.MySqlClient, DataStoreType = QueryBuilder.Helpers.Enums.DataStoreType.Mssql };
- Validate Query var (isValid,message) = await dataStoreHelper.ValidateQueryAsync(query);
- Get Data Rows List<DataRow> rows = await dataStoreHelper.GetDataRowListAsync(query);
- Get DataTable By Paging Models.Table dataTable = await dataStoreHelper.GetTableByPagingAsync(query, 100000);
- Get DataTable DataTable dataTable = await dataStoreHelper.GetDataTableAsync(query);
- Add Record List<Parameter> parameters = await dataStoreHelper.AddAsync(query);
- Delete Record bool deleted = await dataStoreHelper.DeleteAsync(query);
- Save Record int saved = await dataStoreHelper.SaveAsync(query);
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. |
-
net8.0
- Microsoft.Data.SqlClient (>= 5.1.5)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
QueryBuilder