feat(api): Application GetAll, Work GetAll - добавлены фильтры по id

This commit is contained in:
Mikhail Trubnikov
2024-04-03 16:07:41 +10:00
parent 674d02280a
commit 7be64e3529
4 changed files with 17 additions and 0 deletions

View File

@@ -65,6 +65,9 @@ namespace PARR.API.Controllers.V1
if (!string.IsNullOrWhiteSpace(filter.Name))
query = query.Where(t => t.Name.ToLower().Contains(filter.Name.ToLower()));
if (filter.Id.HasValue)
query = query.Where(t => t.Id == filter.Id);
var works = await workService.GetPage(query, paginationFilter).ToListAsync();