Order found products by IsOnWarehouse property
This commit is contained in:
parent
b7e4bf6887
commit
bdf5f4f727
@ -21,6 +21,7 @@ namespace RhSolutions.Api.Controllers
|
|||||||
.Where(p => EF.Functions.ToTsVector(
|
.Where(p => EF.Functions.ToTsVector(
|
||||||
"russian", string.Join(' ', new[] { p.Name, string.Join(' ', p.ProductLines)}))
|
"russian", string.Join(' ', new[] { p.Name, string.Join(' ', p.ProductLines)}))
|
||||||
.Matches(EF.Functions.WebSearchToTsQuery("russian", query)))
|
.Matches(EF.Functions.WebSearchToTsQuery("russian", query)))
|
||||||
|
.OrderByDescending(p => p.IsOnWarehouse)
|
||||||
.AsAsyncEnumerable();
|
.AsAsyncEnumerable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user