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