Skip to content

Commit

Permalink
Minor changes related to volosoft/volo#4551
Browse files Browse the repository at this point in the history
  • Loading branch information
ismcagdas committed Jan 25, 2021
1 parent 4f4490c commit c584cdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion en/tutorials/book-store/part-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ Let's see the changes we've done:
* Injected `IAuthorRepository` to query from the authors.
* Overrode the `GetAsync` method of the base `CrudAppService`, which returns a single `BookDto` object with the given `id`.
* Used a simple LINQ expression to join books and authors and query them together for the given book id.
* Used `AsyncExecuter.FirstOrDefaultAsync(...)` to execute the query and get a result. `AsyncExecuter` was previously used in the `AuthorAppService`. Check the [repository documentation](https://docs.abp.io/en/abp/latest/Repositories) to understand why we've used it.
* Used `AsyncExecuter.FirstOrDefaultAsync(...)` to execute the query and get a result. It is a way to use asynchronous LINQ extensions without depending on the database provider API. Check the [repository documentation](https://docs.abp.io/en/abp/latest/Repositories) to understand why we've used it.
* Throws an `EntityNotFoundException` which results an `HTTP 404` (not found) result if requested book was not present in the database.
* Finally, created a `BookDto` object using the `ObjectMapper`, then assigning the `AuthorName` manually.
* Overrode the `GetListAsync` method of the base `CrudAppService`, which returns a list of books. The logic is similar to the previous method, so you can easily understand the code.
Expand Down
4 changes: 2 additions & 2 deletions en/tutorials/book-store/part-7.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace Acme.BookStore.Authors
}
````

* Inherited from the `EfCoreAuthorRepository`, so it inherits the standard repository method implementations.
* Inherited from the `EfCoreRepository`, so it inherits the standard repository method implementations.
* `WhereIf` is a shortcut extension method of the ABP Framework. It adds the `Where` condition only if the first condition meets (it filters by name, only if the filter was provided). You could do the same yourself, but these type of shortcut methods makes our life easier.
* `sorting` can be a string like `Name`, `Name ASC` or `Name DESC`. It is possible by using the [System.Linq.Dynamic.Core](https://www.nuget.org/packages/System.Linq.Dynamic.Core) NuGet package.

Expand Down Expand Up @@ -215,7 +215,7 @@ namespace Acme.BookStore.Authors
}
```

* Inherited from the `MongoDbAuthorRepository`, so it inherits the standard repository method implementations.
* Inherited from the `MongoDbRepository`, so it inherits the standard repository method implementations.
* `WhereIf` is a shortcut extension method of the ABP Framework. It adds the `Where` condition only if the first condition meets (it filters by name, only if the filter was provided). You could do the same yourself, but these type of shortcut methods makes our life easier.
* `sorting` can be a string like `Name`, `Name ASC` or `Name DESC`. It is possible by using the [System.Linq.Dynamic.Core](https://www.nuget.org/packages/System.Linq.Dynamic.Core) NuGet package.

Expand Down

0 comments on commit c584cdb

Please sign in to comment.