Пример #1
0
        public async Task <IActionResult> GetGroupsAsync([FromQuery] GroupGetModel model)
        {
            model.Validate();

            var list = await _groupRepository.GetGroupsAsync(model.Keyword, model.Page, model.PageSize);

            if (list.Items.Count == 0)
            {
                throw new NotFound404Exception("page");
            }

            return(Ok(GroupList.GetFrom(list)));
        }