Mapping a private backing field with MongoDB C#

后端 未结 1 1709
梦毁少年i
梦毁少年i 2021-01-05 22:10

I\'m trying to get a private backing field mapped in MongoDB.
My model looks like:

public class Competitor
{
    private IList _com         


        
相关标签:
1条回答
  • 2021-01-05 22:52

    This did the trick:

    BsonClassMap.RegisterClassMap<Competitor>(cm =>
    {
        cm.AutoMap();
        cm.MapField("_competitorBests").SetElementName("CompetitorBests");
    });
    
    0 讨论(0)
提交回复
热议问题