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

Model building API: additional configurability of the default conversion for any property of a given type #20418

Open
Tracked by #22952
vslee opened this issue Mar 26, 2020 · 1 comment

Comments

@vslee
Copy link

vslee commented Mar 26, 2020

Once #10784 is complete, a future enhancement might be to add overloads for even more configurability. For example:

IsRequired(Func<IPropertyBase,bool> predicate)
HasComment(Func<IPropertyBase,string> selector)

Used as:

b.IsRequired(p => p.Name.StartsWith('a')) // only make properties starting with 'a' required
b.HasComment(p => $"{p.Name} is a special column") // ability to use the property name in the comment

This would likely need design / api review given how many different permutations and possibilities there are.

@ajcvickers
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants