@@ -48,4 +48,30 @@ change tracking, entity-based LINQ operations, and modeling familiar to
48
48
- Intelligent object tracking
49
49
- Entity-based LINQ operations
50
50
- Entity Framework modeling and mapping with the fluent API
51
- - Automatic database updates through change tracking
51
+ - Automatic database updates through change tracking
52
+
53
+ How Can I Manage Indexes with the {+provider-short+}?
54
+ -----------------------------------------------------
55
+
56
+ You can create indexes with the {+provider-short+} by calling the ``HasIndex()``
57
+ method in the ``OnModelCreating()`` method of your ``DbContext`` class. To learn
58
+ more about how to create indexes with the {+provider-short+}, see the
59
+ :ref:`Indexes <entity-framework-indexes>` guide.
60
+
61
+ Because the {+provider-short+} is built on top of the {+csharp-driver-short+},
62
+ you can also manage indexes in your application by using the {+csharp-driver-short+}
63
+ directly. To use driver methods in your {+provider-short+}
64
+ application, call them on the ``MongoClient`` used to set up your
65
+ ``DbContext``.
66
+
67
+ The following example creates indexes on the ``movies`` collection by using
68
+ {+csharp-driver-short+} methods:
69
+
70
+ .. literalinclude:: /includes/code-examples/faq.cs
71
+ :language: csharp
72
+ :start-after: start-create-index
73
+ :end-before: end-create-index
74
+
75
+ To learn more about creating indexes by using the driver, see the
76
+ `Indexes guide <{+driver-docs-root+}/fundamentals/indexes/>`__ in the
77
+ {+csharp-driver-long+} documentation.
0 commit comments