我对你来说,我只剩下一个 cur子。 也许只是一个设计问题......甚至可能像我不理解数据说明提供者那样简单。
Anyway here we go: I have a class which represents some model data. Let s say it represents a package/box/carton.
It actually represents all of these things so I use the class in several different views. Sometimes I want the attribute of the field Package_Description to be So that it shows up as Box Number : input box here.
现在,如果想把它说成是“卡顿语”,我唯一的选择是将其分类。 或者使用一个单独的类别来说明这一类别。 我的基调是,一些外地名称是用户可图谱的,因此我不可能有固定的定义!
(使用第三方图书馆的方式[Telerik MVC Grid]确实显示这些外地名称,因此不能改变它研究数据说明的事实......)
So I just need to know is there a way to add attributes dynamically? Create an anonymous type on the fly, sub class the original and then add attributes using reflection? Or what other options are open to me, do I need to somehow implement a different annotation provider?