Skip to content

Commit 2ce16a7

Browse files
authored
GetEntityByIdQueryAsync : null check
1 parent 9b371db commit 2ce16a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected override async Task<IQueryable<TEntity>> GetEntityByIdQueryAsync(TKey
5151
{
5252
var query = await Repository.GetQueryableAsync();
5353

54-
return query.Where(e => e.Id.Equals(id));
54+
return query.Where(e =>e.Id != null && e.Id.Equals(id));
5555
}
5656

5757
protected override IQueryable<TEntity> ApplyDefaultSorting(IQueryable<TEntity> query)

0 commit comments

Comments
 (0)