简体   繁体   English

动态创建UI和数据库,最好的方法是什么?

[英]Creating UI and database dynamically, what is the best approach?

I have a requirement in which in order to make an application extensible and reusable, I have to create a provision through which a user would be able to provide a business object structure (the fields, their types, etc.) through an XML file and using that structure the UI (ie the controls and the complete page), the data updation methods (CRUD) and the database (ie the tables and the SPs) can be dynamically generated automatically in order to cater to the business object. 我有一个要求,为了使应用程序可扩展和可重用,我必须创建一个供应,通过该供应,用户将能够通过XML文件提供业务对象结构(字段,其类型等)和使用该结构,UI(即控件和完整页面),数据更新方法(CRUD)和数据库(即表和SP)可以自动动态生成,以满足业务对象。

I've 'only' heard about Entity framework, LINQ, etc. but do not know if they'd be any helpful in achieving what I wish for. 我只是'听说过Entity框架,LINQ等等,但不知道他们是否有助于实现我的目标。

Any suggestions or guidance on how to approach towards this design goal would be highly appreciated. 任何有关如何实现此设计目标的建议或指导都将受到高度赞赏。

Thanks a ton! 万分感谢!

You may want to take a look at ASP.NET Dynamic Data . 您可能需要查看ASP.NET动态数据 It still requires you to provide it an Entity Framework model, but you can dynamically generate the model using the EdmGen.exe tool. 它仍然需要您提供实体框架模型,但您可以使用EdmGen.exe工具动态生成模型。

Here is some info about each... Follow the links more more detail. 以下是关于每个的一些信息...按照链接更多细节。

ASP.NET Dynamic Data ASP.NET动态数据

ASP.NET Dynamic Data provides a framework that enables you to quickly build a functional data-driven application, based on a LINQ to SQL or Entity Framework data model. ASP.NET动态数据提供了一个框架,使您能够基于LINQ to SQL或Entity Framework数据模型快速构建功能数据驱动的应用程序。 It also adds great flexibility and functionality to the DetailsView, FormView, GridView, and ListView controls in the form of smart validation and the ability to easily change the display of these controls using templates. 它还以智能验证的形式为DetailsView,FormView,GridView和ListView控件添加了极大的灵活性和功能,并且能够使用模板轻松更改这些控件的显示。

EdmGen.exe EdmGen.exe

EdmGen.exe is a command-line tool used for working with Entity Framework model and mapping files. EdmGen.exe是一个命令行工具,用于处理Entity Framework模型和映射文件。 You can use the EdmGen.exe tool to do the following: 您可以使用EdmGen.exe工具执行以下操作:

  • Connect to a data source by using a data source–specific .NET Framework data provider, and generate the conceptual model (.csdl), storage model (.ssdl), and mapping (.msl) files that are used by the Entity Framework . 使用特定于数据源的.NET Framework数据提供程序连接到数据源,并生成实体框架使用的概念模型(.csdl),存储模型(.ssdl)和映射(.msl)文件。 For more information, see How to: Use EdmGen.exe to Generate the Model and Mapping Files. 有关更多信息,请参见如何:使用EdmGen.exe生成模型和映射文件。

  • Validate an existing model. 验证现有模型。 For more information, see How to: Use EdmGen.exe to Validate Model and Mapping Files. 有关更多信息,请参见如何:使用EdmGen.exe验证模型和映射文件。

  • Generate a C# or Visual Basic code file that contains the object classes generated from a conceptual model (.csdl) file. 生成包含从概念模型(.csdl)文件生成的对象类的C#或Visual Basic代码文件。 For more information, see How to: Use EdmGen.exe to Generate Object-Layer Code. 有关更多信息,请参见如何:使用EdmGen.exe生成对象层代码。

  • Generate a C# or Visual Basic code file that contains the pre-generated views for an existing model. 生成包含现有模型的预生成视图的C#或Visual Basic代码文件。 For more information, How to: Pre-Generate Views to Improve Query Performance. 有关更多信息,如何:预生成视图以提高查询性能。

商业产品: 企业元素库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Silverlight中创建“联系人列表”的最佳方法是什么? - What is the best approach to creating a “list of contacts” in Silverlight? 轮询数据库时最好的方法是什么? - What is the best approach while polling database? 什么是缓存数据库查询的最佳方法 - What is the best approach for caching database queries 在不阻塞 UI 的情况下打印 UserControl 或 Window 的最佳方法是什么? - What is the best approach for printing a UserControl or a Window without blocking the UI? 创建数据访问对象时最好的方法是什么? - What is the best approach when creating data access objects? 在服务器应用程序中存储配置信息的最佳方法是什么? (没有数据库) - What is the best approach to store configuration info in a server application? (No database) 什么是将关键字存储在数据库中,与语言无关的最佳方法 - what is the best approach to store keywords inside database, language agnostic 管理统一 UI 的最佳方法 - Best Approach to manage unity UI 创建和编辑数据库结构的方法是什么:代码或脚本? - What approach for creating and editing database structure: code or scripts? SerialPort 上多线程的最佳方法是什么 - What is a best approach for multithreading on SerialPort
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM