-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
What problem are you trying to solve?
We prefer to configure our entities via properties on the entities themselves, as opposed to using the fluent syntax, because we've found it makes the code more readable. However, because not every method on PropertyBuilder has an associated attribute (e.g. IsUnicode), it's not possible to use this approach - so we either have to use a half-half approach, or go full fluent; neither of which are desirable.
Describe the solution you'd like
Add attributes that mirror all available methods exposed by PropertyBuilder and result in the same behaviour.
This would have the additional benefit that EF would no longer have to rely on (mis)-using the attributes in the System.Data.DataAnnotations namespace, which are rather... overloaded at this point. That would make it easier for people to transition between fluent syntax and attributes, without needing an entire article to inform users how to map between both ways.