5

Using MongoDB C# Driver 2.3, what's the strongly typed version of the following code?

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

GamePlay has an IEnumerable<PartyInGame>, where PartyInGame has a public string Username { get; set; }

1 Answer 1

1

Just a heads up but for now Robert Stam has said you cannot do this at present but they are planning it for a future release you can track it here... CSHARP-1955

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.