属性添加默认值 Ef Core

可以直接通过默认属性的后面为其赋值
public int sort { get; set; } = 1000;

posted @ 2022-04-29 16:58  咳咳Pro  阅读(317)  评论(0)    收藏  举报