pkg upd by no db
This commit is contained in:
parent
bd1c47e7c6
commit
58750587d0
4 changed files with 42 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue