Fix person searching not searching nicely
This commit is contained in:
parent
296029adc2
commit
ffd1851afc
1 changed files with 2 additions and 2 deletions
|
|
@ -387,8 +387,8 @@ public class PersonRepository : IPersonRepository
|
||||||
|
|
||||||
return await _context.Person
|
return await _context.Person
|
||||||
.Includes(includes)
|
.Includes(includes)
|
||||||
.Where(p => EF.Functions.Like(p.Name, $"%{searchQuery}%")
|
.Where(p => EF.Functions.Like(p.NormalizedName, $"%{searchQuery}%")
|
||||||
|| p.Aliases.Any(pa => EF.Functions.Like(pa.Alias, $"%{searchQuery}%")))
|
|| p.Aliases.Any(pa => EF.Functions.Like(pa.NormalizedAlias, $"%{searchQuery}%")))
|
||||||
.ProjectTo<PersonDto>(_mapper.ConfigurationProvider)
|
.ProjectTo<PersonDto>(_mapper.ConfigurationProvider)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue