XafApplication.CreateObjectSpace<T>() Method
Creates an Object Space of the specified type.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Type Parameters
Name | Description |
---|---|
T | Object type. |
Returns
Type | Description |
---|---|
IObjectSpace | An IObjectSpace object. |
Remarks
For more information about creating an Object Space of the specified type, refer to the following topic: CreateObjectSpace(Type).
The following code demonstrates how to implement a PopupWindowShowAction to create a new Note
object:
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.Persistent.Base;
using YourSolutionName.Module.BusinessObjects;
namespace YourSolutionName.Blazor.Server.Controllers;
public class ShowNotesController : WindowController {
public ShowNotesController() {
PopupWindowShowAction showNotesAction = new PopupWindowShowAction(this, "ShowNotes", PredefinedCategory.Edit);
showNotesAction.CustomizePopupWindowParams += ShowNotesAction_CustomizePopupWindowParams;
}
private void ShowNotesAction_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e) {
IObjectSpace objectSpace = Application.CreateObjectSpace<Note>();
var note = objectSpace.CreateObject<Note>();
e.View = Application.CreateDetailView(objectSpace, note);
}
}
See Also