-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: SAMUS
-
None
The current way of creating indexes using string arguments is neither intuitive nor provides it compile time checking. It would be good to be able to create indexes in a strongly typed fashion.
var col = db.GetCollection<User>();
var meta = col.Metadata;
col.CreateIndex(x => x.Username, "idx_username", true, IndexOption.Ascending);