ORM:如何构建与实体类关联的自定义字段(在运行时动态创建fiedls) [英] ORM : How to build custom fields associates with entity class (the fiedls are dynamically created during runtime)

查看:149
本文介绍了ORM:如何构建与实体类关联的自定义字段(在运行时动态创建fiedls)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现一项功能,使最终用户能够使用UI中的字段创建模块,此外,最终用户可以在以后添加其他新字段。

I'm implementing a feature that enables end user to create a module with fields from UI, furthermore, the end user can add other new fields later.

例如  ;添加一个名为"Name","Age","Sex"的字段的新模块用户,我将新模块和字段存储在数据库中,如下所示:

E.g.  Add a new module user with fields named "Name", "Age", "Sex", I store the new module and fields in database as below:

创建一个新表命名为"用户"在db中为新模块添加,并添加名为"fieldsName"的列和"id"。

create a new table named "User" in db for the new module, and add columns named "fieldsName" and "id".

表:用户

fieldname varchar(20)

fieldname varchar(20)

id int( 100)

id int(100)

 

--- fieldName ------ id ------------- ----

---fieldName------id-----------------

姓名         001

Name         001

性别            002

Sex            002

年龄            003

Age            003

 

我应该如何创建与表设计关联的相关c#类?

How should I create the related c# class to associate with the table design?

推荐答案

您好,

您可以使用ODP .Net 11g工具生成.Net自定义类/类型。它用于在Oracle UDT对象和.Net 业务实体/类之间进行映射。

You can generate the .Net custom classes/types using ODP .Net 11g Tool. It is used for mapping between the Oracle UDT objects and .Net business Entities/Classes.

希望这会有所帮助。

-Mohammed Ghouse Ibne Barq Kadapavi以
http://www.ProgrammersVision.blogspot.com

https://sites.google.com/site/BarqKadapavi

请将回答您问题的帖子标记为答案,并将其他有用的帖子标记为有用。

-Mohammed Ghouse Ibne Barq Kadapavi
http://www.ProgrammersVision.blogspot.com
https://sites.google.com/site/BarqKadapavi
Please mark the post answered your question as the answer, and mark other helpful posts as helpful.


这篇关于ORM:如何构建与实体类关联的自定义字段(在运行时动态创建fiedls)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆