public IActionResult GetGroups([FromRoute] int userId) { var groups = _userFacade.GetAllGroupsOfUser(userId); var items = new List <MinItemGroupResponse>(); groups.ToList().ForEach(g => { var memberAmount = _groupFacade.GetGroupMembers(g.GroupInfo.Id).ToList().Count; var groupInfo = new MinGroupInfo(g.GroupInfo.Id, g.GroupInfo.Title, memberAmount, g.GroupInfo.Size, g.GroupInfo.Price, g.GroupInfo.GroupType, g.GroupInfo.Tags); items.Add(new MinItemGroupResponse(groupInfo)); }); var response = new MinGroupResponse(items); return(Ok(response)); }