Skip to content

Commit

Permalink
Merge pull request #87 from mrahhal/patch-1
Browse files Browse the repository at this point in the history
Fix small mistakes in the code snippets
  • Loading branch information
rowanmiller committed Dec 3, 2015
2 parents 8d1dde0 + 452b800 commit c80fd1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/modeling/generated-properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ No value generation

.. literalinclude:: configuring/sample/EFModeling.Configuring.FluentAPI/Samples/ValueGeneratedNever.cs
:language: c#
:lines: 5-22
:lines: 5-21
:emphasize-lines: 7-9
:linenos:

Expand All @@ -84,7 +84,7 @@ Value generated on add

.. literalinclude:: configuring/sample/EFModeling.Configuring.FluentAPI/Samples/ValueGeneratedOnAdd.cs
:language: c#
:lines: 5-23
:lines: 6-23
:emphasize-lines: 7-9
:linenos:

Expand All @@ -93,6 +93,6 @@ Value generated on add or update

.. literalinclude:: configuring/sample/EFModeling.Configuring.FluentAPI/Samples/ValueGeneratedOnAddOrUpdate.cs
:language: c#
:lines: 6-24
:lines: 6-23
:emphasize-lines: 7-9
:linenos:
2 changes: 1 addition & 1 deletion docs/modeling/indexes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ You can also specify an index over more than one column.
:linenos:

.. note::
There is only one index per distinct set of properties. If you use the Fluent API to configure an index on a set of properties that already has an index defined, either by convention or previous configuration, then you will be changing the definition of that index. This is useful of you want to further configure an index that was created by convention.
There is only one index per distinct set of properties. If you use the Fluent API to configure an index on a set of properties that already has an index defined, either by convention or previous configuration, then you will be changing the definition of that index. This is useful if you want to further configure an index that was created by convention.
2 changes: 1 addition & 1 deletion docs/modeling/relationships.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ One to one relationships have a reference navigation property on both sides. The

When configuring the relationship with the Fluent API, you use the ``HasOne`` and ``WithOne`` methods.

When configuring the foreign key you need to specify the dependent entity type - notice the generic parameter provided to ``HasForeignKey`` in the listing below. In a one-to-many relationship is is clear that the entity with the reference navigation is the dependent and the one with with collection is the principal. But this is not so in a on-to-one relationship - hence the need to explicitly define it.
When configuring the foreign key you need to specify the dependent entity type - notice the generic parameter provided to ``HasForeignKey`` in the listing below. In a one-to-many relationship it is clear that the entity with the reference navigation is the dependent and the one with the collection is the principal. But this is not so in a on-to-one relationship - hence the need to explicitly define it.

.. literalinclude:: configuring/sample/EFModeling.Configuring.FluentAPI/Samples/Relationships/OneToOne.cs
:language: c#
Expand Down

0 comments on commit c80fd1a

Please sign in to comment.