Muslim.EntityAndDto 10.0.1

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

Muslim.EntityAndDto

Base classes for entities and DTOs in .NET 10: an Id, audit fields and soft-delete fields, written once and shared by every table in your application.

dotnet add package Muslim.EntityAndDto

Quick start

using Muslim.EntityAndDto.Entitys;
using Muslim.EntityAndDto.Dtos;

public class Product : Entity
{
    public string Name { get; set; } = "";
    public decimal Price { get; set; }
}

public class ProductDto : Dto
{
    public string Name { get; set; } = "";
    public decimal Price { get; set; }
}

Product now has everything a table usually needs:

var product = new Product
{
    Name        = "Coffee",
    Price       = 4.5m,
    CreatedDate = DateTime.UtcNow,
    CreatedBy   = "admin"
};

// later, a soft delete
product.IsDeleted   = true;
product.DeletedDate = DateTime.UtcNow;
product.DeletedBy   = "admin";

What each class gives you

Class Fields
Entity Id, CreatedDate, CreatedBy, UpdateDate, UpdateBy, IsDeleted, DeletedDate, DeletedBy
EntityBase everything in Entity except Id, DeletedDate and DeletedBy
SuperBase CreatedDate, CreatedBy, UpdateDate, UpdateBy
Dto Id
IdNameDto Id, Name — handy for drop-down lists
Auditable all Entity fields in a standalone, non-abstract class

Interfaces for generic code:

Interface Implemented by
IDBase (Id) Entity, Dto, Auditable
IEntity (CreatedDate) EntityBase, Entity, Auditable
IDto Dto

Entity also implements IHaveFilter, so every entity can be filtered with Muslim.Filter without extra code.

Good to know

  • These are plain classes. Nothing fills the fields for you: set CreatedDate, CreatedBy and the rest in your repository or SaveChanges override.
  • The fields are independent. Setting DeletedDate does not set IsDeleted.
  • No database rules are included here. For table defaults and the soft-delete query filter, use Muslim.ConfigureTable.
  • No dependency-injection setup is needed.
Package Use it for
Muslim.ConfigureTable EF Core table defaults for those entities
Muslim.Filter Filtering, sorting and paging

Coding-agent guidance

When you build a project that uses this package, a short guide for AI coding agents is copied to .agents/skills/muslim.entityanddto/ at the root of your repository. Agents that read skills from .agents/skills, such as Codex and GitHub Copilot in VS Code, use it to write correct code against this package. Your own files and other skills are never touched, and nothing is deleted automatically.

To turn it off, add this to your project or Directory.Build.props:

<PropertyGroup>
  <MuslimEntityAndDtoGenerateSkill>false</MuslimEntityAndDtoGenerateSkill>
</PropertyGroup>

License

See LICENSE.txt.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (4)

Showing the top 4 NuGet packages that depend on Muslim.EntityAndDto:

Package Downloads
Muslim.GenericRepository

EF Core repository for entities with audit columns: reads, writes, soft delete, bulk operations and raw SQL, with CreatedBy/UpdateBy/DeletedBy and UTC timestamps written automatically. Implements Muslim.GenericRepository.Interface.

Muslim.ConfigureTable

EF Core entity configuration defaults and context-scoped nested configuration discovery, with build-delivered agent guidance.

Muslim.GenericRepository.Interface

Repository abstraction over EF Core: IRepository<TEntity> and the interfaces it composes — reads, writes, soft delete, bulk operations, counts and raw SQL. Reference this to depend on the contract without the implementation.

Muslim.GenericService.Interface

Service abstraction for Muslim.GenericService: IService<TEntity> and the interfaces it composes — reads, finds with paging, create, update, delete, soft delete and restore, counts and raw SQL — all returning Muslim.Result Result<T>. Reference this to depend on the contract without the implementation.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 152 10/15/2026
8.0.0 257 9/23/2026
3.0.1 215 8/10/2026
2.0.0 550 10/5/2024

Portable package output; documented contracts; EntityBase and Auditable implement IEntity, and Auditable implements IDBase. Property and JSON contracts are unchanged. Includes optional build-time skill delivery.