dotnet-scaffold-mapperly-factories

Generate Mapperly mappers for EF Core entities and API/client models.

8|1|Updated Feb 5, 2018
One-click install
npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-mapperly-factories
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-scaffold-mapperly-factories
Source: https://github.com/umbrella-libraries/Umbrella/tree/main/.ai-shared/skills/dotnet-scaffold-mapperly-factories
Command: npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-mapperly-factories

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates Mapperly mappers to convert between EF Core entities and API model records, or between client-side model types, following the Umbrella source-generated catalog pattern. This greatly reduces boilerplate and keeps mappings consistent across server and client layers.

Core Features & Use Cases

  • Auto-generates server-side mappers for entity ↔ API model (GET single, GET list, and updates).
  • Auto-generates client-side mappers for API model → UpdateModel and UpdateResultModel ↔ UpdateModel to support edit forms and post-save refreshes.
  • Integrates with the Umbrella Mapperly generator to emit a catalog class and wire registrations at startup; no per-mapper DI is required.

Quick Start

Scaffold Mapperly mappers for your EF Core entities and API/client models by building the solution to generate the mapping catalog.

Frequently Asked Questions about dotnet-scaffold-mapperly-factories

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

FAQPage Schema
How do I generate Mapperly mappers for EF Core entities and API models?

To generate Mapperly mappers for EF Core entities, build your solution to trigger the source generator, which auto-creates server and client mapping classes and registers them in a catalog at startup without manual dependency injection.

What is the best way to reduce boilerplate when mapping EF Core entities to API records?

Using a source-generated Mapperly catalog reduces mapping boilerplate between EF Core entities and API records by automatically generating mappers for GET single, GET list, and update operations across server and client layers.

Do I need Umbrella.Utilities.Mapping.Mapperly to scaffold client-side mappers for edit forms?

Yes, you need the Umbrella.Generators.Mapperly and Umbrella.Utilities.Mapping.Mapperly packages to auto-generate client-side mappers for API model to UpdateModel and UpdateResultModel conversions supporting edit forms.

How does the Mapperly catalog integrate with dependency injection in Program.cs?

The Mapperly catalog integrates with dependency injection by calling AddUmbrellaUtilitiesMappingMapperly in Program.cs, which wires all generated server-side and client-side mappers at startup without requiring per-mapper DI registration.

Can I scaffold mappers for both Web.Server.ModelFactories and Web.Client.Data projects simultaneously?

Yes, the scaffolding applies to both server-side Web.Server.ModelFactories and client-side Web.Client.Data projects, generating entity to API model mappers and client-side update model mappers to keep mappings consistent across layers.

Why does building the solution fail to generate the Mapperly mapping catalog?

Building the solution fails to generate the Mapperly mapping catalog if required Umbrella.Generators.Mapperly and Umbrella.Utilities.Mapping.Mapperly packages are missing or if entity and API model projects are not properly referenced.