简体   繁体   中英

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.

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.

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 . It still requires you to provide it an Entity Framework model, but you can dynamically generate the model using the EdmGen.exe tool.

Here is some info about each... Follow the links more more detail.

ASP.NET Dynamic Data

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. 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.

EdmGen.exe

EdmGen.exe is a command-line tool used for working with Entity Framework model and mapping files. You can use the EdmGen.exe tool to do the following:

  • 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 . For more information, see How to: Use EdmGen.exe to Generate the Model and Mapping Files.

  • Validate an existing model. For more information, see How to: Use EdmGen.exe to Validate Model and Mapping Files.

  • Generate a C# or Visual Basic code file that contains the object classes generated from a conceptual model (.csdl) file. For more information, see How to: Use EdmGen.exe to Generate Object-Layer Code.

  • Generate a C# or Visual Basic code file that contains the pre-generated views for an existing model. For more information, How to: Pre-Generate Views to Improve Query Performance.

商业产品: 企业元素库

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM