public async Task <IHttpActionResult> List(string query = null) { return(JsonWithPermissions(new { Results = await ReagentsDao.Find(this, query) })); }
public async Task <ActionResult> Index(string query) { if (string.IsNullOrWhiteSpace(query)) { return(View(new ReagentsSearchViewModel())); } var model = new ReagentsSearchViewModel { Query = query, Results = await ReagentsDao.Find(this, query) }; return(View(model)); }
public async Task <ActionResult> AddReagent(Lab lab, string query = null) { var model = new LabsAddReagentViewModel { Lab = lab, }; if (string.IsNullOrWhiteSpace(query)) { return(View(model)); } model.Query = query; model.Results = await ReagentsDao.Find(this, query); return(View(model)); }