Mongo数据库实体映射当对应字段不需要映射到表时  使用关键字 BsonIgnore

 [Table("Xmyscqk")]

public class BaseEntity
{

   public ObjectId _id { get; set; }

/// <summary>
/// 年份
/// </summary>
public int Year { get; set; }

[BsonIgnore]
public string SName { get; set; }

[BsonIgnore]
public string ShiName { get; set; }

[BsonIgnore]
public string Caption { get; set; }

相关文章:

  • 2022-12-23
  • 2019-09-03
  • 2021-05-22
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2021-11-05
相关资源
相似解决方案