pkg upd by no db

This commit is contained in:
Paul Schneider 2021-08-11 23:25:15 +01:00
commit 58750587d0
4 changed files with 42 additions and 12 deletions

View file

@ -22,10 +22,10 @@ namespace isn
// GET: PackageVersion
public async Task<IActionResult> Index(PackageVersionIndexViewModel model)
{
var applicationDbContext = _context.PackageVersions.Include(p => p.Package).Where(p => p.PackageId.StartsWith(model.PackageId));
var applicationDbContext = _context.PackageVersions.Include(p => p.Package).Where(
p => ( model.Prerelease || p.IsPrerelease)
&& ((model.PackageId == null) || p.PackageId.StartsWith(model.PackageId)));
model.Versions = await applicationDbContext.ToArrayAsync();
return View(model);
}