Hasim.Core 0.1.1

dotnet add package Hasim.Core --version 0.1.1
                    
NuGet\Install-Package Hasim.Core -Version 0.1.1
                    
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="Hasim.Core" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hasim.Core" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Hasim.Core" />
                    
Project file
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 Hasim.Core --version 0.1.1
                    
#r "nuget: Hasim.Core, 0.1.1"
                    
#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 Hasim.Core@0.1.1
                    
#: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=Hasim.Core&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Hasim.Core&version=0.1.1
                    
Install as a Cake Tool

Hasim.Core

.NET NuGet NuGet Downloads Build License: MIT

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 entitiesAppUser, AppRole and the standard Identity types, all with int keys.
  • Extended user modelAppUser adds profile fields (picture URL/data/content type, first/last name).
  • Audit logging modelAuditLog and EntityChange to 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

  1. Fork the repository.
  2. Create a feature branch.
  3. Submit a pull request.

📄 License

This project is licensed under the MIT License.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
0.1.1 159 8/1/2026
0.1.0 364 8/1/2026