@@ -53,7 +53,7 @@ public class IRaCISDBContext : DbContext
|
||||
//decimal 不配置,默认精度是18,2
|
||||
//configurationBuilder.Conventions.Add(_ => new DecimalPrecisionConvention(18,2));
|
||||
//针对字符串使用默认的长度配置为200,如果标注了StringLength 其他长度,就是标注的长度,如果标注了MaxLength 那么就是nvarcharMax
|
||||
configurationBuilder.Conventions.Add(_ => new DefaultStringLengthConvention(200));
|
||||
configurationBuilder.Conventions.Add(_ => new DefaultStringLengthConvention(400));
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
|
||||
Reference in New Issue
Block a user