aspnetzero-entity-patterns

Creates domain entity classes for ASP.NET Zero Core projects with audit and multi-tenancy patterns.

Updated May 22, 2026
One-click install
npx skills add https://github.com/shakesoft/timekeeper --skill aspnetzero-entity-patterns-shakesoft
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: aspnetzero-entity-patterns
Source: https://github.com/shakesoft/timekeeper/tree/main/.cursor/skills/aspnetzero-entity-patterns
Command: npx skills add https://github.com/shakesoft/timekeeper --skill aspnetzero-entity-patterns-shakesoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working on ASP.NET Zero projects must consistently choose the correct base entity class, primary key type, and multi-tenancy interface when creating domain entities. This Skill codifies those conventions so new entities follow the project's established patterns without guesswork. ## Core Features & Use Cases - Base Class Selection: Guides the choice between Entity, AuditedEntity, and FullAuditedEntity based on audit trail and soft-delete requirements. - Multi-Tenancy Configuration: Applies IMustHaveTenant or IMayHaveTenant interfaces so entities are correctly tenant-scoped and auto-filtered. - Project Structure Enforcement: Places entities in the Core project under feature folders with matching namespaces, and enforces constraints like keeping DTOs and EF Core attributes out of the Core project. - Use Case: When adding a new Product entity to a CadentManagement feature, the Skill generates a FullAuditedEntity with IMustHaveTenant, proper string length attributes, and the correct namespace. ## Quick Start Create a new Product entity in the Core project with full auditing and tenant scoping following the ASP.NET Zero entity patterns.

Frequently Asked Questions about aspnetzero-entity-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new entity in ASP.NET Zero?▼

Create the entity class in the Core project under a feature folder, inherit from FullAuditedEntity for soft delete and full audit trail, and implement IMustHaveTenant if the entity belongs to a tenant. Match the namespace to the folder structure.

Which base class should I use for ASP.NET Zero entities?▼

Use FullAuditedEntity as the default since it provides IsDeleted, DeleterUserId, DeletionTime plus creation and modification audit fields. Use AuditedEntity when soft delete is not needed, and plain Entity only for simple lookup tables.

What is the difference between IMustHaveTenant and IMayHaveTenant?▼

IMustHaveTenant adds a required TenantId for entities that always belong to a tenant, while IMayHaveTenant adds a nullable TenantId for entities that can be host-level or tenant-level. Both enable automatic tenant filtering.

Can I use EF Core data annotations on ASP.NET Zero entities?▼

No, EF Core attributes should not be used on entities in the Core project. Configure entity mappings with Fluent API in the EntityFrameworkCore project instead, keeping the Core project free of persistence concerns.

How do I use Guid or long primary keys for entities?▼

Use the generic form FullAuditedEntity<Guid> or FullAuditedEntity<long> to specify the primary key type. The non-generic FullAuditedEntity defaults to an int primary key, which is the recommended default.