How to: Enable the Administrative UI for managing Users' Model Differences 如何:启用管理 UI 以管理用户的模型差异
This topic describes how to enable UI elements you can use to manage Model Differences stored in the database.
本主题介绍如何启用可用于管理数据库中存储的模型差异的 UI 元素。
Note 注意
Mobile applications do not support Users' Model Differences.
移动应用程序不支持用户的模型差异。
The Administrative UI allows application administrators to manage user settings in user accounts - create, copy, export and reset Model Differences. Follow the steps below to enable this UI in your application:
管理 UI 允许应用程序管理员管理用户帐户中的用户设置 - 创建、复制、导出和重置模型差异。按照以下步骤在应用程序中启用此 UI:
1.If you use XPO, run the Module Designer and add the ModelDifference and ModelDifferenceAspect types to the module in the Exported Types section:
如果使用 XPO,则运行模块设计器,并将"模型差异"和"模型差异"方面类型添加到"导出类型"部分中的模块:
If you use the Entity Framework, register the ModelDifference and ModelDifferenceAspect entity types within your DbContext:
如果使用实体框架,请在 DbContext 中注册模型差异和模型差异方面实体类型:
using DevExpress.Persistent.BaseImpl.EF; // ... public class MyDbContext : DbContext { // ... public DbSet<ModelDifference> ModelDifferences { get; set; } public DbSet<ModelDifferenceAspect> ModelDifferenceAspects { get; set; } }
2.Run the Model Editor and create a new Navigation Item for the ModelDifference_ListView List View.
运行模型编辑器,并为ModelDifference_ListView列表视图创建新的导航项。
Run the application and click this Navigation Item to open the Model Difference List View. Ensure that the Model Differences management Actions are available in the Tools category.
运行该应用程序并单击此导航项以打开模型差异列表视图。确保"工具"类别中的"模型差异管理操作"可用。
Users who used the application at least once have initialized Model Differences. The List View lists these Model Differences. This View also contains the Shared Model Difference record that stores global settings. Click Create Model Differences to create Model Differences for unlisted users. Click Import Shared Model Difference to load shared Model Differences created in Visual Studio (the Model.xafml file). You can also copy, export and reset a selected record. Refer to the Model Difference Storages article's Administrative UI section for more information about these Actions.
至少使用过一次应用程序的用户已初始化模型差异。列表视图列出了这些模型差异。此视图还包含存储全局设置的共享模型差异记录。单击"创建模型差异"为未列出的用户创建模型差异。单击"导入共享模型差异"以加载在 Visual Studio 中创建的共享模型差异(Model.xafml 文件)。您还可以复制、导出和重置选定的记录。有关这些操作的详细信息,请参阅模型差异存储一文的"管理 UI"部分。
Note 注意
The Export Model Differences Action saves model differences to the application's ExportedModelDifferences subfolder. Use the ModelDifferenceViewController.ExportedModelDifferencesPath property to change the folder.
Restart an ASP.NET application on the web server to apply changes if you changed its global settings (for example, using the Import Shared Model Difference Action).
导出模型差异操作将模型差异保存到应用程序的"导出模型差异"子文件夹。使用模型差异视图控制器.导出模型差异路径属性来更改文件夹。
在 Web 服务器上重新启动ASP.NET应用程序以应用更改(例如,使用"导入共享模型差异操作")。更改其全局设置。
XAF开发成品案例参考
如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利。
作者博客: http://www.cnblogs.com/foreachlife
欢迎加入CIIP框架\XAF技术应用交流群: 336090194 群文件中有更多相关工具及文档资料
转载请注明出处。多谢!
欢迎加我微信: admiralcn 或扫码:

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端