EF迁移无法将Datetime(DataType)列更改为long(bigint)

问题描述 投票:0回答:1

我使用EF代码优先方法并通过程序包管理器控制台更改数据库

试图将列发票日期时间更改为长

添加迁移“消息”

Update-Database命令返回错误

Implicit conversion from data type datetime to bigint is not allowed. Use the CONVERT function to 
run this query.
entity-framework ef-code-first alter-column
1个回答
0
投票

之前插入

    [DatabaseGenerated(DatabaseGeneratedOption.None)]
© www.soinside.com 2019 - 2024. All rights reserved.