Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow DisplayAttribute on Class declarations #17139

Closed
cervengoc opened this issue Apr 27, 2016 · 5 comments
Closed

Allow DisplayAttribute on Class declarations #17139

cervengoc opened this issue Apr 27, 2016 · 5 comments
Assignees
Labels
area-System.ComponentModel.DataAnnotations enhancement Product code improvement that does NOT require public API changes/additions help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@cervengoc
Copy link

Hello, I'd like you to consider allowing DisplayAttribute on class declarations. Forgive me if this is a duplicate, I haven't found anything related. Some use cases for it:

  • Auto-generate form captions
  • Auto-generate report captions
  • Use this information to extend nested property captions (like Person.Details.Address could get a label as Personal info / Address)
  • Auto-generate documentation (consuming Description and Order for example)
  • etc.
@joshfree
Copy link
Member

@lajones PTAL

@divega
Copy link
Contributor

divega commented Feb 13, 2017

Data Annotations Triage: This seems to be a reasonable request. We are not planning to work on it for the time being but we would consider a PR. It is likely that changes would be needed on frameworks that use data annotations such as ASP.NET Core MVC (maintained at http://github.com/aspnet/mvc/) in order for it to work end-to-end.

@brunolins16
Copy link
Member

brunolins16 commented Oct 27, 2017

@divega, I'm interested in working on it. Can I PR the DisplayAttribute class changes and if accepted submit an issue on ASP.NET Core MVC repo?

@karelz
Copy link
Member

karelz commented Oct 28, 2017

@brunolins16 I sent you collaborator invite, so that we can assign the issue to you. Ping me once you accept the invitation and I will assign the issue to you. Assigning to myself temporarily.
Note: Being collaborator will automatically make you watch the entire repo (500+ notifications per day). I would recommend to change it to "Not Watching" to get only mentions.

@karelz karelz self-assigned this Oct 28, 2017
@mikernet
Copy link
Contributor

Just curious, how do changes like this to the .NET Core API flow back into the .NET framework? Can I expect this change to be included in .NET Framework vNext as well? This issue is forcing me to use a rather nasty kludge at the moment for required functionality of a library.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.ComponentModel.DataAnnotations enhancement Product code improvement that does NOT require public API changes/additions help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

No branches or pull requests

9 participants