![]() |
VOOZH | about |
dotnet add package BulutBusiness.Core --version 10.0.8
NuGet\Install-Package BulutBusiness.Core -Version 10.0.8
<PackageReference Include="BulutBusiness.Core" Version="10.0.8" />
<PackageVersion Include="BulutBusiness.Core" Version="10.0.8" />Directory.Packages.props
<PackageReference Include="BulutBusiness.Core" />Project file
paket add BulutBusiness.Core --version 10.0.8
#r "nuget: BulutBusiness.Core, 10.0.8"
#:package BulutBusiness.Core@10.0.8
#addin nuget:?package=BulutBusiness.Core&version=10.0.8Install as a Cake Addin
#tool nuget:?package=BulutBusiness.Core&version=10.0.8Install as a Cake Tool
.NET 10 tabanlı kurumsal iş uygulamaları için paylaşımlı altyapı kütüphanesi. Clean Architecture, CQRS ve Repository Pattern prensiplerine uygun olarak tasarlanmıştır.
dotnet add package BulutBusiness.Core
Generic EF Core repository implementasyonu. Tüm CRUD operasyonları, soft delete, sayfalama ve dinamik filtreleme desteklenir.
// Entity base sınıfı
public class Order : Entity<int> { ... }
// Repository
public class OrderRepository : EfRepositoryBase<Order, int, AppDbContext>, IOrderRepository { }
EfRepositoryBase<TEntity, TEntityId, TContext> metodları:
| Metod | Açıklama |
|---|---|
AddAsync |
Ekle (CreatedDate otomatik set edilir) |
UpdateAsync |
Güncelle (UpdatedDate otomatik set edilir) |
DeleteAsync |
Sil — permanent: true kalıcı, varsayılan soft delete |
GetAsync |
Tek kayıt getir |
GetListAsync |
Sayfalı liste getir |
GetListByDynamicAsync |
Dinamik filtreli liste |
AnyAsync |
Varlık kontrolü |
Soft Delete: DeletedDate set edilerek kayıt gizlenir. Cascade soft delete ilişkili kayıtlara otomatik uygulanır.
Timestamp davranışı: CreatedDate, UpdatedDate, DeletedDate alanları DateTime.Now ile set edilir. Container'da TZ ortam değişkeni ayarlıysa (örn. TZ=Europe/Istanbul) doğru yerel saat kaydedilir.
Sayfalama:
var result = await _orderRepository.GetListAsync(
predicate: o => o.Status == OrderStatus.Active,
orderBy: q => q.OrderByDescending(o => o.CreatedDate),
index: 0,
size: 20
);
// result.Items, result.Count, result.Pages, result.HasNext
Dinamik filtreleme:
var result = await _repository.GetListByDynamicAsync(
dynamic: new DynamicQuery
{
Filter = new Filter { Field = "Status", Operator = "eq", Value = "1" },
Sort = [new Sort { Field = "CreatedDate", Dir = "desc" }]
}
);
JWT token üretimi, refresh token yönetimi, şifre hashleme ve iki faktörlü kimlik doğrulama (Email OTP / TOTP).
// appsettings.json
{
"TokenOptions": {
"Audience": "myapp.com",
"Issuer": "myapp.com",
"AccessTokenExpiration": 60,
"SecurityKey": "your-secret-key-min-32-chars"
}
}
// Program.cs
builder.Services.AddSecurityServices();
Bileşenler:
| Bileşen | Açıklama |
|---|---|
JwtHelper |
JWT access token üretir |
HashingHelper |
HMACSHA512 ile şifre hash/verify |
EmailAuthenticatorHelper |
E-posta OTP kodu üretir |
OtpNetOtpAuthenticatorHelper |
TOTP (Google Authenticator uyumlu) |
BearerSecurityRequirementOperationFilter |
Swagger'a otomatik Bearer ekler |
Hazır Security Entity'leri: User, OperationClaim, UserOperationClaim, RoleGroup, RoleGroupOperationClaim, UserRoleGroup, RefreshToken, EmailAuthenticator, OtpAuthenticator
10.0.7 ile eklenen grup tabanlı yetkilendirme sistemi. Kullanıcılara tek tek claim atamak yerine, claim'leri gruplar halinde yönetip kullanıcılara gruplar atanabilir. Bir kullanıcı birden fazla gruba üye olabilir; token oluşturulurken tüm grupların claim'leri düzleştirilerek (flatten) birleştirilir.
RoleGroup ("Satın Alma Yöneticisi")
├─ PurchaseQuotes.Read
├─ PurchaseQuotes.Create
└─ PurchaseInvoices.Read
Kullanıcı: Ahmet
├─ Grup: "Satın Alma Yöneticisi"
└─ Grup: "Stok Görevlisi"
Token'daki roller (flatten + distinct):
["PurchaseQuotes.Read", "PurchaseQuotes.Create", "PurchaseInvoices.Read", "Stock.Read", ...]
// Domain'de extend et (navigation property'ler burada tanımlanır)
public class RoleGroup : RoleGroup<Guid> { }
public class RoleGroupOperationClaim : RoleGroupOperationClaim<Guid, Guid, int> { }
public class UserRoleGroup : UserRoleGroup<Guid, Guid, Guid> { }
// Token oluştururken — ITokenHelper overload
var directClaims = await _userOpClaimRepo.GetClaimsAsync(userId);
var userGroups = await _userRoleGroupRepo.GetGroupsAsync(userId);
var groupClaims = await _roleGroupClaimRepo.GetClaimsByGroupsAsync(groupIds);
var token = _tokenHelper.CreateToken(user, directClaims, userGroups, groupClaims);
Pasif grup davranışı: IsActive = false olan gruplar token'a claim eklemez; bu sayede bir grubun tüm kullanıcı yetkilerini tek seferde askıya alabilirsiniz.
MediatR pipeline üzerinde çalışan cross-cutting concern davranışları.
| Behavior | Interface | Açıklama |
|---|---|---|
AuthorizationBehavior |
ISecuredRequest |
Rol/claim tabanlı yetkilendirme |
CachingBehavior |
ICachableRequest |
In-memory önbellekleme |
CacheRemovingBehavior |
ICacheRemoverRequest |
Cache invalidation |
LoggingBehavior |
ILoggableRequest |
İstek/yanıt loglama |
PerformanceBehavior |
IIntervalRequest |
Yavaş sorgu uyarısı |
TransactionScopeBehavior |
ITransactionalRequest |
Transaction scope |
RequestValidationBehavior |
— | FluentValidation entegrasyonu |
// Yetkilendirme örneği
public class DeleteProductCommand : IRequest<Unit>, ISecuredRequest
{
public string[] Roles => ["Admin", "Manager"];
}
// Önbellekleme örneği
public class GetProductsQuery : IRequest<GetListResponse<ProductDto>>, ICachableRequest
{
public string CacheKey => "Products";
public TimeSpan? SlidingExpiration => TimeSpan.FromMinutes(30);
}
MailKit tabanlı HTML e-posta gönderimi.
// appsettings.json
{
"MailSettings": {
"Server": "smtp.example.com",
"Port": 587,
"SenderFullName": "example",
"SenderEmail": "noreply@example.com",
"UserName": "noreply@example.com",
"Password": "app-password",
"UseSsl": false
}
}
await _mailService.SendEmailAsync(new Mail
{
Subject = "Siparişiniz alındı",
HtmlBody = "<h1>Teşekkürler!</h1>",
ToList = [new ToEmail { Address = "customer@example.com", Name = "Ad Soyad" }]
});
NEST tabanlı ElasticSearch entegrasyonu. Index oluşturma, belge ekleme/güncelleme, arama işlemleri.
// appsettings.json
{
"ElasticSearchConfig": {
"ConnectionString": "http://localhost:9200",
"UserName": "",
"Password": ""
}
}
İki farklı lokalizasyon stratejisi:
ResourceLocalizationManager — .resx dosyası tabanlı, yerel çeviriAmazonTranslateLocalizationManager — AWS Translate ile otomatik çeviriTranslateLocalizationManager — Karma strateji// Program.cs
app.UseMiddleware<LocalizationMiddleware>(); // Accept-Language header'ına göre dil ayarlar
Exception Middleware: BusinessException, AuthorizationException, NotFoundException, ValidationException tiplerini yakalar ve RFC 7807 uyumlu ProblemDetails döner.
Serilog Loglama:
// appsettings.json
{
"SeriLogConfigurations": {
"FileLogConfiguration": {
"FolderPath": "/logs"
}
}
}
RoleGroup<TId> — Name, Description, IsActive alanlarıyla yetki grubu entity'siRoleGroupOperationClaim<TId, TRoleGroupId, TOperationClaimId> — grup ↔ claim N:N köprüsüUserRoleGroup<TId, TUserId, TRoleGroupId> — kullanıcı ↔ grup N:N köprüsüITokenHelper yeni overload — CreateToken(user, directClaims, roleGroups, roleGroupClaims): aktif grupların claim'lerini otomatik flatten + distinct ederek token'a yazar; geriye dönük uyumlu (eski imza korundu)EfRepositoryBase: CreatedDate, UpdatedDate, DeletedDate timestamp'leri DateTime.UtcNow → DateTime.Now olarak değiştirildi. Container TZ ortam değişkeni ile yerel saat desteği sağlandı.| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.8 | 367 | 4/19/2026 |
| 10.0.7 | 159 | 4/9/2026 |
| 10.0.6 | 218 | 4/5/2026 |
| 10.0.5 | 354 | 1/31/2026 |
| 10.0.4 | 114 | 1/31/2026 |
| 10.0.3 | 118 | 1/31/2026 |
| 10.0.2 | 121 | 1/31/2026 |
| 10.0.1 | 125 | 1/31/2026 |
| 10.0.0 | 161 | 11/29/2025 |
| 1.0.5 | 274 | 7/13/2025 |
| 1.0.4 | 467 | 6/9/2025 |
| 1.0.3 | 213 | 6/1/2025 |
| 1.0.2 | 268 | 4/22/2025 |
| 1.0.1 | 242 | 4/22/2025 |
| 1.0.0 | 221 | 4/21/2025 |