Page 1 of 1

EF Core Model (code first) - mapping string to varchar with length spiecified

Posted: Sat 06 Apr 2019 20:16
by Adaƛ
Hi,

i have problem with mapping string from model to database. When database is created string are always mapped to longtext. When i set default length in model setting then all string are mapped to varchar(default length). How can i change it? Even if i set validate max length to let say 50 it is always mapped to longtext or varchar with default length. Any idea how to fix it?

Best regards

Re: EF Core Model (code first) - mapping string to varchar with length spiecified

Posted: Fri 12 Apr 2019 13:03
by Shalex
Please open Property Editor and Press ... against the Column field to open Column Editor. There is the Length field in this dialog. Is that what you need?