当我们使用CodeFirst时,有时候需要设置默认值!
如下
public int Delete { get; set; } = 0; public string AdminName {get; set;} = "admin"; public bool CacheDbResults { get; set; } = true;