ABP - Dependency injection issue for app service when using AbpCrudPageBase in Blazor
ABP uses a naming convention, see https://docs.abp.io/en/abp/latest/Dependency-Injection#exposed-services-by-convention
So, if you rename IPersonAppService
to IPeopleAppService
the problem will be solved.
Thanks for the minimal, reproducible example
@TheMagnificent11 in response to the question you wrote in the comment;
The problem is caused by the following code block in People.razor
.
<DataGridColumns>
<DataGridColumn TItem="PersonDto"
Field="@nameof(PersonDto.GivenName)"
Caption="@Localizer["PeopleTable:GivenName"]">
</DataGridColumn>
</DataGridColumns>
<DataGridColumns>
<DataGridColumn TItem="PersonDto"
Field="@nameof(PersonDto.Surname)"
Caption="@Localizer["PeopleTable:Surname"]">
</DataGridColumn>
</DataGridColumns>
It is necessary to replace this code with the following:
<DataGridColumns>
<DataGridColumn TItem="PersonDto"
Field="@nameof(PersonDto.GivenName)"
Caption="@Localizer["PeopleTable:GivenName"]">
</DataGridColumn>
<DataGridColumn TItem="PersonDto"
Field="@nameof(PersonDto.Surname)"
Caption="@Localizer["PeopleTable:Surname"]">
</DataGridColumn>
</DataGridColumns>
In short, the problem is that the DataGridColumns
tag is used twice in the same DataGrid
.
PS: @TheMagnificent11 I couldn't fit the answer into the comment field so I had to write it here, FYI.