SqlSugar实体类中如果不映射某个属性,可以用特性 [SugarColumn(IsIgnore =true)]
[SugarColumn(IsIgnore = true)]
public string Option_User { get; set; }
MySQL 实体类中如果不映射某个属性,可以用特性 [NotMapped]
[NotMapped]
public string Option_User { get; set; }
在SqlSugar和MySQL中,可以使用不同的特性来忽略实体类中的某些属性进行映射。对于SqlSugar,可以使用[SugarColumn(IsIgnore=true)],而在MySQL实体类中,相应的特性是[NotMapped]。这些特性允许开发者在ORM过程中排除不希望参与数据库交互的字段。
SqlSugar实体类中如果不映射某个属性,可以用特性 [SugarColumn(IsIgnore =true)]
[SugarColumn(IsIgnore = true)]
public string Option_User { get; set; }
MySQL 实体类中如果不映射某个属性,可以用特性 [NotMapped]
[NotMapped]
public string Option_User { get; set; }
1486
4231
1万+
3118