Hasim.Core
0.1.1
dotnet add package Hasim.Core --version 0.1.1
NuGet\Install-Package Hasim.Core -Version 0.1.1
<PackageReference Include="Hasim.Core" Version="0.1.1" />
<PackageVersion Include="Hasim.Core" Version="0.1.1" />
<PackageReference Include="Hasim.Core" />
paket add Hasim.Core --version 0.1.1
#r "nuget: Hasim.Core, 0.1.1"
#:package Hasim.Core@0.1.1
#addin nuget:?package=Hasim.Core&version=0.1.1
#tool nuget:?package=Hasim.Core&version=0.1.1
Hasim.Core
A customizable base library for Entity Framework Core providing reusable abstractions, repository patterns, unit of work, common configurations, and auditing to accelerate .NET application development.
This repository holds the reusable domain, identity, and audit entities shared across the Hasim.* ecosystem. The DbContext and EF Core mappings that consume these entities live in the companion project Hasim.EntityFrameworkCore.
✨ Features
- Identity-ready entities —
AppUser,AppRoleand the standard Identity types, all withintkeys. - Extended user model —
AppUseradds profile fields (picture URL/data/content type, first/last name). - Audit logging model —
AuditLogandEntityChangeto trace who changed what, and at which property level. - Packaged as a NuGet library — a single base-model dependency for your data-access layer.
📦 Installation
dotnet add package Hasim.Core
🚀 Getting Started
Hasim.Core is the model layer. Reference it from your EF Core data-access project (e.g. Hasim.EntityFrameworkCore) and use its entities in your DbContext.
1. Add the package
dotnet add package Hasim.Core
2. Reference the model layer
Add a package reference from your data-access project to Hasim.Core.
3. Use the entities in your DbContext
Derive your context from IdentityDbContext using the Hasim.Core identity types, and expose the audit DbSets:
using Hasim.Core.Entities;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
public class MyDbContext
: IdentityDbContext<AppUser, AppRole, int,
AppUserClaim, AppUserRole, AppUserLogin, AppRoleClaim, AppUserToken>
{
public DbSet<AuditLog> AuditLogs { get; set; } = default!;
public DbSet<EntityChange> EntityChanges { get; set; } = default!;
}
🧱 Architecture
Hasim.Core/
└── Src/Hasim.Core/
├── Entities/
│ ├── Identity/
│ │ ├── AppUser.cs # IdentityUser<int> + profile/picture fields
│ │ ├── AppRole.cs # IdentityRole<int>
│ │ └── AppUserClaim, AppRoleClaim, AppUserLogin, AppUserRole, AppUserToken
│ └── Audits/
│ ├── AuditLog.cs # audit record (action, entity, IP, correlation id, user)
│ └── EntityChange.cs # property-level change, FK → AuditLog
└── Hasim.Core.csproj
Entities
| Entity | Description |
|---|---|
AppUser |
IdentityUser<int> extended with PictureUrl, PictureData, PictureContentType, FirstName, LastName. |
AppRole |
IdentityRole<int>. |
AppUserClaim, AppRoleClaim, AppUserLogin, AppUserRole, AppUserToken |
Thin subclasses of the standard Identity types. |
AuditLog |
High-level audit record (action, entity name, IP, correlation id, optional user). |
EntityChange |
Detailed property-level change (OldValue / NewValue) linked to an AuditLog. |
📚 Dependencies
🔧 Requirements
- .NET 8.0 SDK
🤝 Contributing
- Fork the repository.
- Create a feature branch.
- Submit a pull request.
📄 License
This project is licensed under the MIT License.
| 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 was computed. 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. |
-
net8.0
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Hasim.Core:
| Package | Downloads |
|---|---|
|
Hasim.Auditify
A lightweight, pluggable audit-trail library for EF Core 8+. Automatically captures entity changes (Added/Modified/Deleted), supports sensitive data masking, soft-delete patterns, and timestamp tracking. |
|
|
Hasim.EntityFrameworkCore
A customizable ASP.NET Core Identity entities library providing reusable base identity models and common abstractions for modern .NET applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.