Created
October 5, 2017 07:19
-
-
Save NMZivkovic/eee6d0542d2d74cfa79717d9b35d3ba2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task CreateIndexOnNameField() | |
{ | |
var keys = Builders<User>.IndexKeys.Ascending(x => x.Name); | |
await _usersCollection.Indexes.CreateOneAsync(keys); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment