dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.72k stars 3.17k forks source link

Fluent API #18384

Closed walmanarias closed 1 year ago

walmanarias commented 5 years ago

When writing the configuration on fluent api like this: builder.Property(x=>x.SomeProperty).HasColumnType("char").HasMaxLength(10);

migration for this line: SomeProperty: table.Column(type: "char", unicode: false, fixedLength: true, maxLength: 10, nullable: true)

the database end result for the column type is char(1) and the maxlength part is not taken in consideration although the migration looks find.

ajcvickers commented 5 years ago

Duplicate of #15159