BaseQore 1.0.205
dotnet add package BaseQore --version 1.0.205
NuGet\Install-Package BaseQore -Version 1.0.205
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="BaseQore" Version="1.0.205" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BaseQore" Version="1.0.205" />
<PackageReference Include="BaseQore" />
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 BaseQore --version 1.0.205
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BaseQore, 1.0.205"
#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 BaseQore@1.0.205
#: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=BaseQore&version=1.0.205
#tool nuget:?package=BaseQore&version=1.0.205
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
# BaseQore Consumer Guide
A lightweight .NET Core framework for CRUD, caching, audit-trail, and message-broker integration.
This guide shows how to **install**, **configure**, and **consume** BaseQore in the own microservice.
---
## Prerequisites
- [.NET 8.0 SDK+](https://dotnet.microsoft.com/download)
- A relational database (e.g. PostgreSQL, SQL Server, MySQL)
- (Optional) Redis for caching
- (Optional) Kafka (or other MQ) for events
---
## 1. Install NuGet Packages
```bash
dotnet add package ef.qore.BaseQore --version 1.0.20
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet add package StackExchange.Redis
dotnet add package Confluent.Kafka
2. appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "<YOUR_DB_CONN>",
"Redis" : "redis:6379"
},
"CacheSettings": {
"Enabled": true,
"Provider": "Redis",
"DefaultExpiryMinutes": 30
},
"FileLoggingSettings": {
"EnableFileLogging": true,
"LogFilePath": "Logs/audit.log"
},
"MessageBrokerSettings": {
"Enabled": true,
"Provider": "Kafka",
"ConnectionString": "kafka:9092"
},
"KafkaProducerConfig": {
"bootstrap.servers" : "kafka:9092",
"client.id" : "my-app-producer",
"acks" : "all",
"enable.idempotence" : true,
"message.send.max.retries" : 3,
"retry.backoff.ms" : 1000,
"linger.ms" : 5
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
3. Register Services (Program.cs)
using BaseQore.Extensions;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
// 1) EF Core DbContexts
builder.Services
.AddDbContext<AppDbContext>(opts =>
opts.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")))
// 2) BaseQore Core (Repos & Services)
builder.Services.AddBaseQoreCore<AppDbContext>();
// 3) Caching
builder.Services.AddBaseQoreCaching(builder.Configuration);
// 4) Message Broker (default no-op + Kafka override)
builder.Services
.AddBaseQoreMessageBroker(builder.Configuration)
.AddBaseQoreKafkaBroker();
// 5) Your domain registrations
builder.Services
.AddScoped<IProductsRepository, ProductsRepository>()
.AddScoped<IProductsCacheService, ProductsCacheService>()
.AddScoped<IProductsService, ProductsService>();
builder.Services.AddControllers();
var app = builder.Build();
app.MapControllers();
app.Run();
4. Define Your Entity
using BaseQore.Attributes;
using BaseQore.Entity;
using BaseQore.Enums;
namespace MyApp.Entities
{
[Auditable]
[Cacheable]
[Publish(PublishOn = Action.Create | Action.Update | Action.Delete)]
public class Products : BaseEntity
{
public string Name { get; set; } = "";
public string Code { get; set; } = "";
public ProductType Type { get; set; }
}
}
[Auditable]→ writes audit trail[Cacheable]→ enables read/update/delete caching[Publish]→ sends events on Create/Update/Delete
5. Repository Implementation
using BaseQore.Repositories.Interface;
using Microsoft.EntityFrameworkCore;
using MyApp.Entities;
namespace MyApp.Repositories
{
public class ProductsRepository
: IBaseRepository<Products, ProductsFilter, AppDbContext, SlaveDbContext>
{
// Inject AppDbContext & SlaveDbContext
// Implement GetByIdAsync, AddAsync, UpdateAsync, DeleteAsync,
// MarkAsDeletedAsync, UpdateStatusAsync, GetAllAsync, GetPagedAsync, etc.
}
}
6. Cache Service
using BaseQore.Cache;
using BaseQore.Cache.Interface;
using MyApp.Entities;
namespace MyApp.Cache
{
public interface IProductCacheService: IBaseEntityCacheService<Products> {
}
public class ProductsCacheService
: BaseEntityCacheService<Products>, IProductCacheService
{
protected override string CacheKeyPrefix => nameof(Products);
public ProductsCacheService(HybridCache cacheService)
: base(cacheService) { }
}
}
7. Domain Service
using BaseQore.Cache.Interface;
using BaseQore.MessageBroker.Interface;
using BaseQore.Services;
using Microsoft.Extensions.Options;
using MyApp.Cache;
using MyApp.Entities;
using MyApp.Repositories;
using BaseQore.Settings;
using BaseQore.Utilities;
namespace MyApp.Services
{
public class ProductsService
: BaseService<
Products,
ProductsFilter,
AppDbContext>,
IProductsService
{
public ProductsService(
IProductsRepository repo,
IStringLocalizer<LanguageResponse> loc,
IAuditTrailService auditSvc,
AppDbContext ctx,
IOptions<FileLoggingSettings> logOpts,
ICacheService cacheSvc,
IOptions<CacheSettings> cacheOpts,
IProductsCacheService cacheEntitySvc,
IBrokerService brokerSvc,
IOptions<MessageBrokerSettings> brokerOpts
) : base(
repo, loc, auditSvc, mCtx, sCtx,
logOpts, cacheSvc, cacheOpts,
cacheEntitySvc,
brokerSvc, brokerOpts
)
{ }
}
}
8. Web API Controller
using Microsoft.AspNetCore.Mvc;
using MyApp.Entities;
using MyApp.Services;
namespace MyApp.Controllers
{
[ApiController]
[Route("api/products")]
public class ProductsController : ControllerBase
{
private readonly IProductsService _svc;
public ProductsController(IProductsService svc) => _svc = svc;
[HttpGet("{id}")]
public async Task<IActionResult> Get(int id)
=> Ok(await _svc.GetByIdAsync(id));
[HttpPost]
public async Task<IActionResult> Create(Products p)
{
var created = await _svc.SaveAsync(p);
return CreatedAtAction(nameof(Get), new { id = created.Id }, created);
}
[HttpPut("{id}")]
public async Task<IActionResult> Update(int id, Products p)
{
await _svc.UpdateAsync(p, id);
return NoContent();
}
[HttpDelete("{id}")]
public async Task<IActionResult> Delete(int id)
{
await _svc.DeleteAsync(id, user: "system", modifiedByIp: "127.0.0.1");
return NoContent();
}
}
}
9. Run & Verify
- Start your DB, Redis, and Kafka (e.g. via Docker Compose).
dotnet runyour API.- Test endpoints with Postman or cURL:
- GET → reads (caches on first hit)
- PUT → updates (refreshes cache & publishes event)
- DELETE → deletes (evicts cache & publishes event)
- Check Redis keys (
Products:{id}) and Kafka topicProductsfor JSON messages.
10. Pipeline added
Pipeline configured.
Enjoy rapid CRUD + caching + messaging with minimal boilerplate!
| 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- AutoMapper.Extensions.Microsoft.DependencyInjection (>= 12.0.1)
- Confluent.Kafka (>= 1.9.2)
- EFCore.NamingConventions (>= 8.0.3)
- Microsoft.EntityFrameworkCore (>= 8.0.8)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Caching.Hybrid (>= 9.10.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 8.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Options (>= 9.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 8.0.8)
- Serilog.AspNetCore (>= 6.0.1)
- StackExchange.Redis (>= 2.8.31)
- Swashbuckle.AspNetCore.Annotations (>= 6.2.3)
-
net9.0
- AutoMapper.Extensions.Microsoft.DependencyInjection (>= 12.0.1)
- Confluent.Kafka (>= 1.9.2)
- EFCore.NamingConventions (>= 9.0.0)
- Microsoft.EntityFrameworkCore (>= 9.0.0)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Caching.Hybrid (>= 9.10.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Options (>= 9.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 9.0.0)
- Serilog.AspNetCore (>= 6.0.1)
- StackExchange.Redis (>= 2.8.31)
- Swashbuckle.AspNetCore.Annotations (>= 6.2.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.205 | 336 | 12/18/2025 |
| 1.0.204 | 264 | 12/15/2025 |
| 1.0.203 | 145 | 12/12/2025 |
| 1.0.202 | 160 | 12/12/2025 |
| 1.0.201 | 159 | 12/12/2025 |
| 1.0.192 | 438 | 12/11/2025 |
| 1.0.191 | 465 | 12/10/2025 |
| 1.0.19 | 697 | 12/2/2025 |
| 1.0.18 | 698 | 12/2/2025 |
| 1.0.17 | 432 | 11/19/2025 |
| 1.0.15 | 429 | 11/18/2025 |
| 1.0.14 | 427 | 11/18/2025 |
| 1.0.13 | 419 | 11/18/2025 |
| 1.0.12 | 422 | 11/18/2025 |
| 1.0.2 | 442 | 12/11/2025 |
| 1.0.1 | 315 | 11/11/2025 |