0
0

Compare commits

...

4 Commits

Author SHA1 Message Date
Sergey Chebotar
a8ec0cee16 Revert ClosedXML to 0.100.0 2023-05-12 08:26:49 +03:00
Sergey Chebotar
33f88a3f62 Add .dockerignore 2023-05-12 08:26:33 +03:00
Sergey Chebotar
bdf5f4f727 Order found products by IsOnWarehouse property 2023-05-12 07:46:06 +03:00
Sergey Chebotar
b7e4bf6887 Fix search product by id 2023-05-12 07:45:27 +03:00
4 changed files with 22 additions and 20 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
[Dd]eploy/

View File

@ -28,7 +28,7 @@ namespace RhSolutions.Api.Controllers
public IEnumerable<Product> GetProduct(string id)
{
return dbContext.Products
.Where(p => p.ProductSku!.Equals(id));
.Where(p => p.Id.Equals(id));
}
[HttpPost]

View File

@ -21,6 +21,7 @@ namespace RhSolutions.Api.Controllers
.Where(p => EF.Functions.ToTsVector(
"russian", string.Join(' ', new[] { p.Name, string.Join(' ', p.ProductLines)}))
.Matches(EF.Functions.WebSearchToTsQuery("russian", query)))
.OrderByDescending(p => p.IsOnWarehouse)
.AsAsyncEnumerable();
}
}

View File

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.101.0" />
<PackageReference Include="ClosedXML" Version="0.100.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>