0.2.0 #4

Merged
mfnefd merged 15 commits from dev into main 2024-12-11 04:42:35 +04:00
Showing only changes of commit 732514300b - Show all commits

View File

@ -102,10 +102,13 @@ public class SpendingGroupRepo : ISpendingGroupRepo
query = query.Where(x => x.Id == search.Id);
}
if (!string.IsNullOrWhiteSpace(search.Name) && search.UserId.HasValue)
if (search.UserId.HasValue)
{
query = query.Where(x => x.Name.Contains(search.Name, StringComparison.OrdinalIgnoreCase)
&& x.UserId == search.UserId);
query = query.Where(x => x.UserId == search.UserId);
if (!string.IsNullOrWhiteSpace(search.Name))
{
query = query.Where(x => x.Name.Contains(search.Name, StringComparison.OrdinalIgnoreCase));
}
}
}