umbraco-repository-pattern

Explains Umbraco's repository pattern for abstracting data access in the backoffice.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/kraftvaerk/Kraftvaerk.Umbraco.Alchemy --skill umbraco-repository-pattern-kraftvaerk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: umbraco-repository-pattern
Source: https://github.com/kraftvaerk/Kraftvaerk.Umbraco.Alchemy/tree/main/Kraftvaerk.Umbraco.Alchemy.Frontend/.agents/skills/umbraco-repository-pattern
Command: npx skills add https://github.com/kraftvaerk/Kraftvaerk.Umbraco.Alchemy --skill umbraco-repository-pattern-kraftvaerk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers understand and implement the repository pattern in Umbraco, providing a structured and maintainable way to manage data access and abstract data sources.

Core Features & Use Cases

  • Data Abstraction: Learn how repositories decouple business logic from data access.
  • API Integration: Understand how to use generated OpenAPI clients for secure API calls.
  • Use Case: Implement a new feature in the Umbraco backoffice that requires fetching and displaying a list of custom items, ensuring data is accessed securely and efficiently through a repository.

Quick Start

Use the umbraco-repository-pattern skill to generate a basic repository implementation for managing product data.

Frequently Asked Questions about umbraco-repository-pattern

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

FAQPage Schema
How do I implement the repository pattern for data access in the Umbraco backoffice?

To implement the repository pattern in Umbraco, you create repository classes that abstract data sources, register them for dependency injection, and use generated OpenAPI clients for secure API calls within the backoffice.

What is the repository pattern used for in Umbraco backoffice development?

The repository pattern in Umbraco is used to decouple business logic from data access. It provides a structured and maintainable way to manage data sources by centralizing data fetching and context usage operations.

How do I use an OpenAPI client within an Umbraco repository?

You use a generated OpenAPI client inside an Umbraco repository by integrating it as the data source. The repository wraps the client's API calls, abstracting the secure data fetching process away from your backoffice business logic.

Can I fetch and display custom items in Umbraco using a repository?

Yes, you can fetch and display custom items by implementing a repository. The repository handles the data source integration and context usage, ensuring your backoffice feature accesses the custom item list securely and efficiently.

Do I need TypeScript to build data access repositories in Umbraco?

TypeScript is used for Umbraco backoffice development when implementing the repository pattern. It provides the typed structure needed to manage data abstraction and OpenAPI client integration effectively within your applications.

When should I use the repository pattern instead of direct data access in Umbraco?

You should use the repository pattern in Umbraco when building scalable and maintainable applications that require abstracted data sources. It is essential for decoupling business logic from direct API calls and managing complex data fetching.