Browse Source

Update Part-10.md

pull/15507/head
Onur Pıçakcı 3 years ago
parent
commit
dd762f3496
  1. 14
      docs/en/Tutorials/Part-10.md

14
docs/en/Tutorials/Part-10.md

@ -1130,15 +1130,15 @@ Override the `OpenCreateModalAsync` method and adding the following code:
````csharp
protected override async Task OpenCreateModalAsync()
{
if (!authorList.Any())
{
if (!authorList.Any())
{
throw new UserFriendlyException(message: L["AnAuthorIsRequiredForCreatingBook"]);
}
await base.OpenCreateModalAsync();
NewEntity.AuthorId = authorList.First().Id;
throw new UserFriendlyException(message: L["AnAuthorIsRequiredForCreatingBook"]);
}
await base.OpenCreateModalAsync();
NewEntity.AuthorId = authorList.First().Id;
}
````
The final `@code` block should be the following:

Loading…
Cancel
Save