public async Task <ActionResult> AddMember(Lab lab, string query = null) { var model = new LabsAddMemberViewModel { Lab = lab, }; if (string.IsNullOrWhiteSpace(query)) { return(View(model)); } model.Query = query; model.Results = await LabsDao.ListAddableMembers(this, lab.LabId, query); return(View(model)); }
public async Task <IHttpActionResult> AddableMembers(long labId, string query = null) { var(_, isLabManager) = await GetLab(labId); return(JsonWithPermissions(await LabsDao.ListAddableMembers(this, labId, query), isLabManager, isLabManager, isLabManager)); }