public async Task <IEnumerable <GroupDto> > GetBySubname(string subname) { if (string.IsNullOrWhiteSpace(subname)) { throw new HttpResponseException(HttpStatusCode.BadRequest); } var groups = await GroupGenericFacade.GetGroupsContainingSubNameAsync(subname); return(groups); }
// GET: GroupManager public async Task <ActionResult> Index([FromUri] string subname) { var filter = new GroupFilterDto { SubName = subname }; var user = await BasicUserFacade.GetUserByNickNameAsync(User.Identity.Name); var groups = await GroupGenericFacade.GetGroupsContainingSubNameAsync(subname); var basicUserWithGroups = await BasicUserFacade.GetBasicUserWithGroups(user.Id); return(View("GroupManagementView", new FindGroupsModel { Filter = filter, Groups = groups, User = basicUserWithGroups })); }