ASP.NET MVC add HiddenInput attribute to Model in DLL -


I am working on an ASP.NET MVC 3 application which is using data models from a compiled library. However, I would like to be able to add the following announcement to the compiled DLL in some data model properties:

  [hidden input (display = valid)]   

It is that I do not have a source for the DLL and the author does not want to present dependency on System.Web.Mvc. Is there any way, partial classes or something like that which will allow me to add this feature?

Mark

No, there is no way to compile properties, Cooked in metadata and existing classes can not be modified on runtime. As far as partial orbits are concerned, they work only in that assembly.

Also, if the authors of this assembly do not want to present a dependency with the System.Web.Mvc in their library, they have reasons for this. Obviously, you should use the model of seeing as an MVC developer, which are specially tailored to the needs of your ideas and then the map between the domain model (comes from various libraries ... and see the model) Please. Then you can not see those visual models and give to the domain model. Of course, in our Idea Model all necessary metadata and formatting such as DisplayName are hidden ... to minimize mapping between those two classes that you can use.

Comments