Skip to content

Commit

Permalink
fix typos on typeorm.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LorianeE committed Oct 13, 2020
1 parent 74d6f97 commit 93e48f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/tutorials/typeorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ We can use this model with a Controller like that:
## EntityRepository

You can create a custom repository which should contain methods to work with your database.
Usually custom repositories are created for a single entity and contains its specific queries.
Usually custom repositories are created for a single entity and contain their specific queries.
For example, let's say we want to have a method called `findByName(firstName: string, lastName: string)` which will search for users by a given first and last names.
The best place for this method is in Repository, so we could call it like `userRepository.findByName(...)`.
You can achieve this using custom repositories.

`@tsed/typeorm` plugin configures the DI so that repositories declared for TypeORM can be injected into a Ts.ED controller or service
`@tsed/typeorm` plugin configures the DI so that repositories declared for TypeORM can be injected into a Ts.ED controller or service.

The first way to create a custom repository is to extend Repository. Example:

Expand All @@ -110,4 +110,4 @@ Use @@UseConnection@@ decorator to select which database connection the injected
<a href="/contributing.html" class="nav-link button">
Become maintainer
</a>
</div>
</div>

0 comments on commit 93e48f6

Please sign in to comment.