Esempio n. 1
0
 public ActionResult ListPackages([FromQuery(Name = "isFull")] bool isFull, [FromQuery(Name = "index")] int pageIndex, [FromQuery(Name = "size")] int pageSize = 25)
 {
     if (isFull)
     {
         return(new JsonResult(new
         {
             success = new
             {
                 packages = _packageList.Get(pageIndex, pageSize)
             }
         }));
     }
     else
     {
         return(new JsonResult(new
         {
             success = new
             {
                 packages = _indexService.GetPackageIds(pageIndex, pageSize)
             }
         }));
     }
 }