“从数据库更新模型”没有看到类型更改 [英] "Update Model from Database" does not see a type change

查看:118
本文介绍了“从数据库更新模型”没有看到类型更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个列,我从Int更改为BigInt。



我打开了我的EF模型,并做了一个从数据库更新模型,并期望看到列现在是Int64s。但是他们还是Int32。



(我跑了好几次,只是为了确定。)



检查我的数据库,这些列绝对是BigInts。



所以...从数据库更新模型不会改变数据类型?是否需要手动应用?

解决方案

不幸的是,您需要从模型中删除项目,然后添加回到 - 至少这是我唯一能够得到工作的东西。



至少有一个第三方工具可以帮助这个,但是没有亲自试过。


I have several columns that I changed from Int to BigInt.

I opened up my EF model and did an 'Update Model from Database' and expected to see those columns now be Int64s. But they are still Int32s.

(I ran it several times just to be sure.)

I double checked my database and the columns are definitely BigInts.

So... does 'Update Model from Database' not work for a change of data type? Does it need to be manually applied?

解决方案

Unfortunately, you'll need to delete the items from your model and then add them back in - at least that's the only thing I have managed to get working.

There is at least one third-party tool that is supposed to help with this, but have not tried it personally.

这篇关于“从数据库更新模型”没有看到类型更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆