Beispiel #1
0
        private List <SelectListItem> GetSquadList(Guid memberId)
        {
            var squads = squadQuery.GetSquads(club.Guid);

            if (!memberId.IsEmpty())
            {
                var player = memberQuery.GetPlayer(memberId);
                squads = squadQuery.GetMemberSquads(memberId, Membership.Player);
            }

            var squadList = squads.Select(s => new SelectListItem {
                Text = $"{s.Name}", Value = s.Guid.ToString()
            })
                            .OrderBy(s => s.Text)
                            .ToList();

            return(squadList);
        }
        public IActionResult GetMySquads(DashboardModel model)
        {
            var squads = squadQuery.GetMemberSquads(model.MemberId, Membership.Player);

            return(new JsonResult(squads));
        }