腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(922)
视频
沙龙
1
回答
EF
核心
RemoveRange
System.InvalidCastException
:
无法
将
'
System.Int32
‘
类型
的
对象
强制
转
换为
'
System.Int64
’
类型
c#
、
entity-framework
、
.net-core
在一种在集成测试之间进行数据库清理
的
方法中,当我删除下面代码片段中
的
任何一个SaveChanges()调用时,我会得到两个测试
的
异常,但是如果这两个调用都存在,它就可以正常工作。
System.InvalidCastException
: Unable to cast object of type '
System.Int32
' to type '
System.Int64
'. ctx.<em
浏览 70
提问于2021-03-31
得票数 2
1
回答
无法
将
“
System.Int32
”
类型
的
对象
强制
转
换为
“
System.Int64
”
类型
c#
、
casting
、
type-conversion
如果错误
无法
将
System.Int64
类型
的
对象
转
换为
System.Int32
类型
,我会理解这是由于数据缩小
的
可能性。但是,我不明白为什么会出现错误,
无法
将
System.Int32
类型
的
对象
转
换为
System.Int64
类型
,尽管long
的
浏览 2
提问于2020-04-24
得票数 5
回答已采纳
1
回答
将
InvalidCastException
核心
5应用程序从ASP.NET迁移到Linux后
的
ASP.NET
azure-web-app-service
、
asp.net-core-5.0
、
ef-core-5.0
、
azure-linux
在将我
的
ASP.NET
核心
5应用程序从Azure Windows应用程序服务转移到Linux服务之后,我几乎在我
的
所有端点上都得到了这些错误: InvalidCastException (
无法
将
'
System.Int32
‘
类型
的
对象
转
换为
'System.String’。
无法
将
“System.Guid”
类型
的
对象</e
浏览 4
提问于2021-08-04
得票数 0
回答已采纳
1
回答
具有可枚举转换
的
System.InvalidCastException
c#
、
casting
、
ienumerable
为什么我在下面的代码中看到
System.InvalidCastException
?obj[0] = 1;obj[0] = 3;obj[0] = 5;
无法
将
类型
为
System.Int32
的
对象
强制
转
换为
类型
System.
浏览 0
提问于2020-06-15
得票数 1
2
回答
C#:
无法
将
“
System.Int64
”
类型
的
对象
转
换为
“
System.Int32
”
类型
c#
、
.net
、
mono
、
xamarin.ios
Color = (int)dict.GetValue("color");
System.InvalidCastException
:
无法
将
'
System.Int64
‘
类型
的
对象
强制
转
换为
’System.Int 32‘。
浏览 2
提问于2015-07-31
得票数 28
回答已采纳
1
回答
C#‘
无法
将
'
System.Int32
’
类型
的
对象
转
换为
‘System.Char’。
c#
、
casting
以下代码创建了字母表中所有字母
的
可迭代性;效果很好。但是,以下内容不起作用;它抛出一个异常 "
System.InvalidCastException
:‘
无法
将
'
System.Int32
’<e
浏览 3
提问于2020-04-05
得票数 0
回答已采纳
3
回答
如何
将
( Long)列表转
换为
字符串数组?(VB)
vb.net
我想把(长
的
)列表转换成字符串数组。但是我显然没有正确地使用转换,因为它引发了一个异常:
System.InvalidCastException
:
无法
将
'
System.Int64
‘
类型
浏览 7
提问于2009-10-26
得票数 5
回答已采纳
1
回答
使用实体框架
核心
将
数字(9,0)映射到整型
的
最佳方法
c#
、
.net
、
sql-server
、
entity-framework-core
在我们
的
sql server数据库中,我们有Numeric(9,0)
类型
的
列。当我从数据库创建模型时,这些列在c#中被赋予了decimal
类型
。然而,我不明白为什么我们不能在这里使用int。如果我只是尝试在模型中使用int,如下所示:{} 我
将
收到此错误:
System.InvalidCastException
:‘
无法
将
类型
为'Syste
浏览 0
提问于2021-03-11
得票数 0
1
回答
C#中
的
误差铸造
c#
、
casting
、
compiler-errors
我得到了以下错误
System.InvalidCastException
:
无法
将
'
System.Int64
‘
类型
的
对象
转
换为
'System.String’。
浏览 3
提问于2011-05-10
得票数 1
2
回答
ASP.NET MVC动态编号
类型
asp.net-mvc-3
、
dynamic
dynamicTableName;但是,动态列有时是int
类型
的
int,我尝试了long,因为它涵盖了int,但是程序抛出了异常: { i
浏览 5
提问于2013-01-12
得票数 0
回答已采纳
2
回答
用System.Linq.Dynamic.Core
将
结果转
换为
自定义类
linq
、
dynamic-linq
我正在尝试用为自定义类键入结果,但我得到了异常: class MyClass public int LangId { get; set; } public int Gr
浏览 0
提问于2018-09-24
得票数 1
回答已采纳
1
回答
使用ExecuteStoreQuery隐含结果错误
的
ROW_NUMBER()解决方法
entity-framework
、
database-partitioning
、
row-number
、
executestorequery
我正在使用
EF
4.0在我
的
脑海中做一个非常基本
的
查询。我已经确认我
的
表中引用
的
所有列都是Int (我们既不使用bigint也不使用smallint),所以我排除了这一点。我曾尝试
将
类型
更改为Int64,然后它会抱怨
将
类型
转
换为
Int32。这让我相信“问题不是问题”
类型
的
场景。
EF
系统在抱怨什么?STARTDATE)
浏览 5
提问于2012-02-15
得票数 2
回答已采纳
2
回答
无法
将
PersistentGenericBag转
换为
ISet异常
c#
、
nhibernate
我得到了一个例外: public virtual ISet<long> Ids { g
浏览 4
提问于2011-08-18
得票数 1
回答已采纳
1
回答
抛出;据说不重置堆栈跟踪,但在某些情况下会重新设置堆栈跟踪。
c#
、
.net
:
无法
将
'
System.Int32
‘
类型
的
对象
转
换为
'System.String’。:
无法
将
'
System.Int32
‘
类型
的
对象
转
换为
'System.String’。另外,第13行和第18行都不是转换实际发生
的
行。 我现在
的
问题是:throw;在什么情况下更改堆栈跟踪,
浏览 3
提问于2012-09-11
得票数 10
回答已采纳
1
回答
无法
在项目绑定功能上使用中继器项
asp.net
、
linq
、
webforms
我
的
代码在中继器itemDataBound上抛出异常 其他信息:
无法
将
'<>f__AnonymousType4`18System.String、
System.Int64
、System.String、
System.Int32
、
System.Int32
、System.Decimal、
System.Int32
、System.Decimal、System.Decimal、
System.Int32
、System.Decimal、Syste
浏览 0
提问于2018-10-23
得票数 0
回答已采纳
2
回答
不能用
EF
核心
把国际投到十进制吗?
c#
、
mysql
、
entity-framework
、
entity-framework-core
我正试图解决一个问题,
将
大型into (22+位数)从实体框架
核心
从MySQL数据库拖到ASP.Net中。
System.InvalidCastException
:
无法
将
“
System.Int32
”
类型
的</e
浏览 5
提问于2017-02-04
得票数 3
2
回答
将
LINQ返回值转
换为
二维数组
c#
、
arrays
、
linq
、
matrix
LINQ结果正常,返回预期结果,但
无法
帮助自己以int格式返回它们。int[][] b) return (int[][])a.Select((x, i) => x.Select((y, j) => a[i][j] + b[i][j]));错误:
System.InvalidCastException
:“
无法
将
类型
为”d__52[
System.Int32
[],System.Collections.Generic.IEnumerable1System.In
浏览 0
提问于2018-10-12
得票数 4
回答已采纳
1
回答
带有ASP.NET 4.6
的
实体框架7
c#
、
.net
、
entity-framework
、
asp.net-web-api
、
entity-framework-core
问题很简单:是否可以
将
Entity Framework 7 (beta4)与ASP.NET 4.6 (在我
的
例子中是Web)结合使用?目前,我
无法
使它工作,经常会出现以下例外情况: Microsoft.Framework.DependencyInjection.Interfaces.dll中发生了
System.InvalidCastException
类型
的
异常,但在用户代码中没有处理。其他信息:
无法
将
Microsoft.Framework.Loggi
浏览 2
提问于2015-07-13
得票数 2
回答已采纳
3
回答
有没有一种在C#中进行动态隐式
类型
转换
的
方法?
c#
、
type-conversion
、
dynamic-cast
、
implicit-conversion
、
dynamic-invoke
对于具有隐式cast运算符
的
该类:{但以下情况并非如此:object g = f;这给出了编译时间:
无法</e
浏览 5
提问于2010-01-18
得票数 12
回答已采纳
1
回答
在
EF
中尝试获取SQL时引发
的
InvalidCastException
c#
、
sql-server
、
ef-core-3.1
'.异常:
System.InvalidCastException
:
无法
强制
转换
类型
为
System.InvalidCastException
的
对象
在Microsoft.EntityFrameworkCore.Query.QuerySqlGenerator.VisitIn
核心
:VisitIn中QuerySqlGenerator
的
QuerySqlGenerator方法有关。例如,当我试图使用CreateSetFilterExp
浏览 4
提问于2020-06-05
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
PHP漏洞函数总结
Python笔记-NumPy
Elasticsearch 6.x Mapping设置
一文看懂PHP 8的新特性
干货 | 携程门票H5转小程序实践
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券