sql-server - 如何使用代码优先将 Id 降序保存在数据库中?
问题描述
我想使用代码优先将 Id 保存为表中的降序
但是我不知道怎么做
我的模型:
public class AccountChangeHistory
{
[Key]
public int Id { get; set; }
public int CustomerId { get; set; }
public string Action { get; set; }
public DateTime DateTime { get; set; }
[ForeignKey("CustomerId")]
public virtual Customer Customer { get; set; }
}
解决方案
推荐阅读
- r - 当它小于 2.225074e-308 (.Machine&double.xmin) 时,在 R 中获取完整的 P 值
- image-processing - Jpeg,删除色度,只保留亮度而不重新压缩?
- blueprism - 我需要一个进程的工作队列吗?蓝棱镜
- python - 检查并转换多索引类型
- javascript - 变量不是我在循环中所期望的
- php - bootstrap、css 或响应式在移动设备和 PC 上都不起作用
- eclipse-che - 如何更新图像中使用的 Theia 版本?
- c++ - 如何将 mpl::set 的内容扩展为函数模板的模板参数
- c# - 在父页面 UWP 中访问用户控件的按钮单击
- django-models - django 防止空模型被保存