Data is Null. This method or property cannot be called on Null values.

升级到 abp.io 7.4

EF报错

System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at Microsoft.Data.SqlClient.SqlBuffer.ThrowIfNull()
at Microsoft.Data.SqlClient.SqlBuffer.get_String()
at Microsoft.Data.SqlClient.SqlDataReader.GetString(Int32 i)

 

public string Entry_Date { get; set; }

设置为

public string? Entry_Date getset}

除了可空类型配置外还有ABP默认的几个字段的值需要更新为默认

如数据库表字段 ExtraProperties 不能NULL默认值是【{}】、数据库表字段ConcurrencyStamp不能NULL

posted @ 2023-12-06 15:07  慧☆星  阅读(150)  评论(0编辑  收藏  举报