[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Deployment
 [Collapse]Task-Based Help
  [Collapse]Business Model Design
   [Expand]Common Tasks
   [Expand]Entity Framework (EF)
   [Expand]eXpress Persistent Objects (XPO)
   [Collapse]Non-Persistent Objects
     How to: Display a List of Non-Persistent Objects in a Popup Dialog
     How to: Display a Non-Persistent Object's Detail View from the Navigation
     How to: Display a Non-Persistent Object's List View from the Navigation
     How to: Display Non-Persistent Objects in a Report
     How to: Perform CRUD Operations with Non-Persistent Objects
     How to: Show Persistent Objects in a Non-Persistent Object's View
  [Expand]Application Model
  [Expand]Actions
  [Expand]Navigation
  [Expand]Views
  [Expand]List Editors
  [Expand]Property Editors
  [Expand]Templates
  [Expand]Filtering
  [Expand]Reporting
  [Expand]Dashboards
  [Expand]Scheduler and Notifications
  [Expand]Maps Module
  [Expand]Security
  [Expand]Workflow
  [Expand]Localization
  [Expand]Testing
  [Expand]Miscellaneous UI Customizations
  Frequently Asked Questions (FAQ)
 [Expand]API Reference
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Perform CRUD Operations with Non-Persistent Objects

This example demonstrates how to create, read, update and delete Non-Persistent Objects. In this example, the static cache is used as a temporary storage for non-persistent objects.

  1. Implement the following non-persistent class:

  2. Open the WinApplication.cs (WinApplication.vb), WebApplication.cs (WebApplication.vb) and/or MobileApplication.cs (MobileApplication.vb) code. Ensure that the NonPersistentObjectSpaceProvider is registered in the overridden CreateDefaultObjectSpaceProvider method (in addition to the existing XPObjectSpaceProvider or EFObjectSpaceProvider). Currently, this code is added automatically by the Solution Wizard, but it may be missing if you have created your project using an older version of XAF.

  3. Implement the following Controller:

    This Controller handles the following events:

Expanded See Also

Is this topic helpful?​​​​​​​