[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]Report and Dashboard Server
[Collapse]eXpressApp Framework
 [Expand]Getting Started
 [Expand]Design-Time Features
 [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]List Editors
  [Expand]Property Editors
  [Expand]Scheduler and Notifications
  [Expand]Maps Module
  [Expand]Miscellaneous UI Customizations
  Frequently Asked Questions (FAQ)
 [Expand]API Reference
[Expand]eXpress Persistent Objects
[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?​​​​​​​