Browse Source

Merge pull request #4869 from abpframework/maliming/MapCodeNamespace

Map the BookStore code namespace.
pull/4960/head
Halil İbrahim Kalkan 6 years ago
committed by GitHub
parent
commit
5f95562ac8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      docs/en/Tutorials/Part-6.md

9
docs/en/Tutorials/Part-6.md

@ -242,6 +242,15 @@ This is a unique string represents the error code thrown by your application and
"BookStore:00001": "There is already an author with the same name: {name}"
````
Then open the `BookStoreDomainSharedModule` and add the following code block inside the `ConfigureServices` method:
````csharp
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("BookStore", typeof(BookStoreResource));
});
````
Whenever you throw an `AuthorAlreadyExistsException`, the end use will see a nice error message on the UI.
## IAuthorRepository

Loading…
Cancel
Save