Browse Source

GetEntityByIdQueryAsync : null check

pull/26016/head
Mohamed Nazem 22 hours ago
committed by GitHub
parent
commit
2ce16a7bb8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs

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

@ -51,7 +51,7 @@ public abstract class ReadOnlyAppService<TEntity, TGetOutputDto, TGetListOutputD
{
var query = await Repository.GetQueryableAsync();
return query.Where(e => e.Id.Equals(id));
return query.Where(e =>e.Id != null && e.Id.Equals(id));
}
protected override IQueryable<TEntity> ApplyDefaultSorting(IQueryable<TEntity> query)

Loading…
Cancel
Save