示例#1
0
        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);
        }
示例#2
0
        // 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
            }));
        }