Пример #1
0
        public async Task <IActionResult> GetGroups([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var groupDetails = await _groupsRepository.GetGroupWithDetails(id);

            if (groupDetails == null)
            {
                return(NotFound());
            }

            return(Ok(groupDetails));
        }