设计/架构问题 [英] Design/Architecture question
问题描述
Hello All,
Hello All,
我正在设计一个winform appl,用于管理应用程序数据库。
I am in the process of designing a winform appl which is used to manage an Application Database.
GUI需要在后端显示包含数据库表的所有列的数据网格。但是,用户还需要添加/删除属性(列)的功能!!
The GUI needs to display a datagrid with all the columns of a DB table in the back end. But, the users will need the functionality for adding/removing attributes(Columns) as well!!
例如,产品表可能具有类型,大小,颜色等属性。明天,用户可能决定添加另一个属性,例如"扇区"。
For eg, a product table might have attributes like Type, Size, Color,etc. Tomorrow, the users might decide to add another attribute, say "Sector".
用户需要能够在datagrid中进行更新,但是当他们点击一行并选择详细信息时,列(Attibutes)将需要以详细信息形式显示为文本框/下拉列表。
The users will need to be able to make updates in the datagrid, but when they click on a row and select details, the columns(Attibutes) will need to be displayed as text boxes/drop down lists in a details form.
winforms应用程序与Web服务进行通信,后者又与更新数据库的DAL进行对话。
The winforms app talks to web services, which in turn talks to a DAL which updates the database.
如果模式是静态的,我可以将选定的行映射到业务对象,并且可以在Web服务上传递它并从DAL读取对象。但是现在,由于添加/删除属性功能,我无法输入数据集/ Business Objects,因为产品的属性列表不是固定的。
If the schema had been static, I could have mapped the selected row to a business object and could have passed it on the web service and read the object from the DAL. But now, I cant have typed datasets/Business Objects because of the add/delete attributes functionality since the list of properties for a product are not fixed.
从运行中获取数据集并在运行时构建详细信息屏幕似乎有点复杂,因为我们有要维护的大量表以及处理列的顺序更改的复杂性,使用索引访问列等。是否有任何建议的方法/更好的解决方案?
Getting a dataset from the service and building the details screen at runtime seems to be a bit complex since we have a large number of tables to maintain and the complexities of handling order change of columns, accessing the columns using an index,etc. Is there any suggested way/a better solution for this?
谢谢,
Arun
推荐答案
Arun,LInQ为您的方案提供了更好的解决方案。 刷新dbmx / edmx文件时,数据定义会更新。 在客户端更新服务引用时,数据库结构更改将在
系统的GUI层可用。
Arun, LInQ provides the better solution for your scenario. On refreshing dbmx/edmx file, the data definition get updated. On updating the service reference in the client side, the database structure changes will be available at GUI layer of the system.
这篇关于设计/架构问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!