I am playing about with interfaces and custom views and cannot get the views to render the domain objects according to just the metadata defined on the interface. Instead they render based upon the concrete instance metadata.
I have a domain object called User. What I want to do is to be able to create 3 interfaces that User implements and have the views render the User based on the interface:
IUserTableView - used when displaying a User in a table, so has a restricted subset of all of the User properties.
IUserPropertyView - used when displaying a User in a property list (readonly), so displays all of the properties.
IUserPropertyEdit - used when editing a User in a property edit list (read/write), so hides all non editable properties (i.e. navigation properties that are collections)
Interfaces do seem to be adhered to when used as the return type of a navigation property and also in actions, but the html helpers don't seem to honour them.
Is this a bug? Is it possible to achieve the above?