首页 > 其他分享 >Data is Null. This method or property cannot be called on Null values.

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

时间:2023-12-06 15:11:06浏览次数:32  
标签:get method SqlClient cannot Null Data called

升级到 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 { get; set; }

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

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

标签:get,method,SqlClient,cannot,Null,Data,called
From: https://www.cnblogs.com/smartstar/p/17879598.html

相关文章

  • centos 8 Failed to download metadata for repo ‘AppStream’: Cannot prepare inte
     查询后发现问题的原因是Centos8于2021年年底停止了服务,我们在使用yum源安装时候,出现下面错误“错误:Failedtodownloadmetadataforrepo‘AppStream’:Cannotprepareinternalmirrorlist:NoURLsinmirrorlist”。解决办法:1. 进入yum的repos目录:  cd/etc/yum.r......
  • nullptr关键字
    文章参考:爱编程的大丙(subingwen.cn)C使用NULL表示空,其定义为:#defineNULL((void*)0)在C++中同样定义了NULL,C和C++虽然都是强类型语言,但是C++对语言的要求更高,不允许(void*)类型进行隐式的类型转化,因此如果沿袭C中NULL的定义,那么下述代码会出错:int*p=NULL;因此C++......
  • 1、ImportError: cannot import name 'soft_unicode' from 'markupsafe'解决;2、Import
    不知做了啥操作,spyder和jupyter同时打不开(我印象中啥也没做),出现闪了一下后没反应,不知道报错在哪里。1、先解决spyder的报错:ImportError:cannotimportname'soft_unicode'from'markupsafe'于是我打开Anaconda,找到Spyder点击launch,报错如下:Traceback(mostrecentcallla......
  • 2023-12-02 cannot found module 'xxx'
    问题描述:运行命令报错找不到模块原因:你本地没装好依赖解决方案:删掉依赖,重新build但有时事实并不如此简单,就比如我记录这个bug,不仅仅是删掉依赖,重新build就可以了,还需要找到一个lock文件。如:yarn.lock,如果没有该文件,那么你拉下来的依赖的版本依旧不符合需求,原因就是版本号不同......
  • Flutter开发type 'Null' is not a subtype of type 'Handler'报错
    问题描述今天调试flutter程序时报错,程序运行时报如下错误:type'Null'isnotasubtypeoftype'Handler'问题分析类型“Future<int>”不是类型强制转换中类型“int”的子类型。这里不能强制转换,要拿到DatabaseHelper.dbhelper.getTaskGroupRelationOrde()返回结果可以使用Dat......
  • ORA-01187 cannot read from file 201 because it failed verification tests..temp01
    Description:WegetthismessageinrunningtheUpgradeExpress20-21export(create_customer_data):ORA-01187:cannotreadfromfile201becauseitfailedverificationtestsORA-01110:datafile201:'/exlibris/oradata/aleph20/aleph20_temp01.dbf'O......
  • swagger - NullPointerException
    java.lang.NullPointerException:null atspringfox.documentation.swagger2.mappers.RequestParameterMapper.bodyParameter(RequestParameterMapper.java:264)~[springfox-swagger2-3.0.0.jar:3.0.0]解决方式:寻找@ApiImplicitParam(name=""),name值没有对应接口入参......
  • 【SpringBoot】单元测试报错java.lang.IllegalStateException: Could not load TestCo
    一、运行test类方法时候报错 二、分析原因,发现版本不一致 三、找到pom文件, 把<version>RELEASE</version>注释掉,刷新一下maven依赖 四:修改后,依赖版本一致。 这样,就可以运行了。 ......
  • 【问题记录】【IDEA】启动突然报错 java: Internal error in the mapping processor:
    1 启动报错换了个高版本的IDEA,启动突然报错:2 解决办法添加编译配置参数:-Djps.track.ap.dependencies=false......
  • MySQL 连接字符串中加入 nullCatalogMeansCurrent = true 的含义
    nullCatalogMeansCurrent的含义:nullCatalogMeansCurrent=true#在指定的数据库中查找需要的表nullCatalogMeansCurrent=false#在服务器全部数据库中查找需要的表不同MySQL驱动nullCatalogMeansCurrent默认情况:从mysql-connector-java5.x版本起,nullCatal......