pkg upd by no db

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

View File

@ -2,6 +2,8 @@ using System.Collections.Generic;
using System.Linq;
using isn.Controllers;
using isn.Data;
using isn.ViewModels;
using isnd.ViewModels;
using Microsoft.EntityFrameworkCore;
using NuGet.Versioning;
using Unleash;
@ -15,7 +17,7 @@ namespace isnd.Services
{
this.dbContext = dbContext;
}
public IndexResult SearchByName(string query,
public PackageIndexViewModel SearchByName(string query,
int skip, int take,bool prerelease = false,
string packageType = null)
{
@ -30,7 +32,7 @@ namespace isnd.Services
var total = scope.Count();
var pkgs = scope.Skip(skip).Take(take).ToArray();
return new IndexResult
return new PackageIndexViewModel
{
totalHits = total,
data = pkgs