Ejemplo n.º 1
0
 public async Task <IHttpActionResult> List(string query = null)
 {
     return(JsonWithPermissions(new
     {
         Results = await SamplesDao.Find(this, query)
     }));
 }
Ejemplo n.º 2
0
        public async Task <ActionResult> Index(string query = null)
        {
            if (string.IsNullOrWhiteSpace(query))
            {
                return(View(new SamplesSearchViewModel()));
            }

            var model = new SamplesSearchViewModel
            {
                Query   = query,
                Results = await SamplesDao.Find(this, query)
            };

            return(View(model));
        }