aspnetzero-appservice-patterns

Implements CRUD application service patterns for ASP.NET Zero with ABP framework conventions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing application services in ASP.NET Zero involves many framework-specific conventions—authorization attributes, DTO mapping, tenant handling, paging, and NSwag proxy generation—that are easy to get wrong and cause subtle bugs like broken service-proxies.ts or Dynamic LINQ parse exceptions. ## Core Features & Use Cases - CRUD Service Templates: Provides complete interface and implementation patterns for Get, GetForEdit, Create, Update, and Delete methods following ABP conventions. - Pitfall Prevention: Documents critical rules such as setting TenantId after mapping, using IsNullOrWhiteSpace for sorting fallbacks, and adding [HttpPost] to Get* methods with custom input DTOs. - Use Case: When adding a new Product management feature to an ASP.NET Zero application, use this Skill to generate the IProductAppService interface and ProductAppService implementation with correct authorization, paging, filtering, and ObjectMapper usage. ## Quick Start Create an ASP.NET Zero application service for the Product entity with full CRUD methods following the standard patterns.

Frequently Asked Questions about aspnetzero-appservice-patterns

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

FAQPage Schema
How do I create a CRUD application service in ASP.NET Zero?▼

Define an interface in Application.Shared inheriting IApplicationService, then implement it in the Application layer inheriting your AppServiceBase class. Add [AbpAuthorize] to every method, use IRepository<T> for data access, and ObjectMapper for entity-DTO conversions.

Why is my input DTO class missing from service-proxies.ts in ASP.NET Zero?▼

ABP routes Get* methods as HTTP GET by default, so NSwag serializes the input as query-string parameters instead of a typed body DTO. Add [HttpPost] to any Get* method taking a custom input DTO so the class is generated in service-proxies.ts.

Why does Dynamic LINQ throw ParseException on OrderBy in ABP?▼

Angular and PrimeNG clients send sorting as an empty string rather than null, so the ?? operator does not protect against it. Use input.Sorting.IsNullOrWhiteSpace() ? "DefaultField" : input.Sorting to provide a safe fallback.

How should GetForEdit handle create mode in ASP.NET Zero?▼

GetForEdit should accept NullableIdDto. When Id is null, return a new DTO with sensible defaults plus lookup data like ComboboxItemDto lists; when Id has a value, load the entity and map it. UIs call GetForEdit for both create and edit.

Can I access DbContext directly in an ABP application service?▼

No, the pattern requires using IRepository<TEntity> or IRepository<TEntity, TPrimaryKey> injected via the constructor. Direct DbContext access bypasses ABP's unit of work, filtering, and auditing mechanisms.