KEMBAR78
Mapping attribute for IsUnicode · Issue #19794 · dotnet/efcore · GitHub
Skip to content

Mapping attribute for IsUnicode #19794

@IanKemp

Description

@IanKemp

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions