devexpress-xaf-business-logic

Implements DevExpress XAF CRUD and business logic using IObjectSpace for EF Core and XPO.

39|7|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/DevExpress/agent-skills --skill devexpress-xaf-business-logic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: devexpress-xaf-business-logic
Source: https://github.com/DevExpress/agent-skills/tree/main/plugins/dx-xaf/skills/devexpress-xaf-business-logic
Command: npx skills add https://github.com/DevExpress/agent-skills --skill devexpress-xaf-business-logic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates common errors, hallucinations, and incorrect API usage when implementing data manipulation and business logic in DevExpress XAF applications by providing official, tested patterns for the core IObjectSpace abstraction.

Core Features & Use Cases

  • ORM-Agnostic Guidance: Supports both EF Core and XPO, with automatic ORM detection and loading of XPO-specific sub-skills for advanced patterns.
  • Comprehensive Code Patterns: Includes ready-to-use snippets for CRUD operations, ObjectSpace lifecycle event handling, IXafEntityObject hook implementation, NonPersistentObjectSpace configuration, and nested Object Space management for popup views.
  • Real-World Use Case: For example, when building a XAF business class that needs to set default property values on object creation, or a controller that runs pre-save validation via the Committing event, this skill provides the correct implementation to avoid pitfalls like memory leaks from unsubscribed events or invalid persistent object instantiation.

Quick Start

Use this skill to generate a XAF ObjectViewController that creates a new persistent object, sets its required properties, and saves it to the database using the correct IObjectSpace API.

Frequently Asked Questions about devexpress-xaf-business-logic

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

FAQPage Schema
How do I implement CRUD operations in DevExpress XAF using IObjectSpace?

Persistent object creation in XAF requires using IObjectSpace methods rather than direct instantiation. This ensures proper ORM context registration for both EF Core and XPO, preventing invalid object state and data inconsistencies.

Does DevExpress XAF support both EF Core and XPO for business logic implementation?

DevExpress XAF supports both EF Core and XPO for business logic implementation. The IObjectSpace abstraction automatically detects the ORM in use and applies the correct patterns, loading XPO-specific sub-skills for advanced scenarios.

How do I handle save events and pre-save validation in XAF controllers?

Save events and pre-save validation in XAF are handled by subscribing to the IObjectSpace Committing event within a controller. This allows running validation logic before persistent objects are saved to the database while adhering to security constraints.

What is the correct way to configure NonPersistentObjectSpace in XAF?

Configuring NonPersistentObjectSpace in XAF involves setting up a nested Object Space to manage non-persistent objects for popup views. This pattern ensures proper object lifecycle handling and cross-ObjectSpace object import without causing memory leaks.

How do I implement soft delete and data seeding in DevExpress XAF?

Soft delete in XAF is implemented using IObjectSpace deletion patterns, while data seeding uses ModuleUpdater hooks during application updates. Both techniques leverage IObjectSpace to maintain data consistency and adhere to XAF best practices.

Why does my XAF business class lose default property values on object creation?

Default property values on XAF business class creation are lost when bypassing the IXafEntityObject hook. Implementing the correct lifecycle hook via IObjectSpace ensures required properties are set properly during object initialization.