EF Core Error:Unable to cast object of type ‘System.DBNull‘ to type ‘System.String‘()

(163条消息) EF Core Error:Unable to cast object of type ‘System.DBNull‘ to type ‘System.String‘_webmote的博客-CSDN博客

<PropertyGroup> <TargetFramework>net6.0</TargetFramework> <Nullable>disable</Nullable> <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup>

双击项目,改为disable就可以了。

————————

(163条消息) EF Core Error:Unable to cast object of type ‘System.DBNull‘ to type ‘System.String‘_webmote的博客-CSDN博客

<PropertyGroup> <TargetFramework>net6.0</TargetFramework> <Nullable>disable</Nullable> <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup>

双击项目,改为disable就可以了。