Skip to content

Commit

Permalink
feat: better "not found" messages from data sources when the ID is nu…
Browse files Browse the repository at this point in the history
…ll or empty string. (#447)
  • Loading branch information
ascott18 committed Sep 25, 2024
1 parent 7be4839 commit cf4f3ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 5.0.2

- feat: better "not found" messages from data sources when the ID is null or empty string. (#447)
- fix(template): adjust manual chunking configuration to avoid circular deps. (#455)

# 5.0.1

- fix: `c-input` once again respects the validation rules defined by the bound ViewModel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ public virtual async Task<ListResult<TDto>> GetMappedListAsync<TDto>(IListParame
/// <param name="id">The key of the item that was requested.</param>
public virtual string GetNotFoundMessage(object id)
{
id = id switch
{
"" => "\"\"",
null => "<null>",
_ => id
};

return $"{ClassViewModel.DisplayName} item with ID {id} was not found.";
}

Expand Down

0 comments on commit cf4f3ba

Please sign in to comment.