2016-12-12 66 views
4

使用MongoDB C#驱动程序2.3,以下代码的强类型版本是什么?Mongo C#在嵌套数组属性上的强类型索引

database.GetCollection<GamePlay>() 
    .Indexes 
    .CreateOne("{ \"PartiesInGame.Username\": 1 }"); 

GamePlayIEnumerable<PartyInGame>,其中PartyInGamepublic string Username { get; set; }

回答

1

刚抬起头,但现在罗伯特·斯塔姆说你不能在目前这样做,但他们计划它在未来版本中,你可以跟踪它在这里... CSHARP-1955