예제 #1
0
 public async Task <IHttpActionResult> List(string query = null)
 {
     return(JsonWithPermissions(new
     {
         Results = await LabsDao.Find(this, query)
     }));
 }
예제 #2
0
        public async Task <ActionResult> Index(string query = null)
        {
            var results = await LabsDao.Find(this, query);

            if (results.Count == 0 && string.IsNullOrWhiteSpace(query))
            {
                results = null;
            }

            var model = new LabsSearchViewModel
            {
                Query   = query,
                Results = results
            };

            return(View(model));
        }