コード例 #1
0
        public ActionResult GetListOfListener(Guid confId)
        {
            List <UserAtConference> result = new List <UserAtConference>();

            var listenerIds = _conferencService.GetListIdListeners(confId).ToList();
            var lesteners   = _userService.GetUsersByListId(listenerIds);

            if (lesteners.Count != 0)
            {
                foreach (var lst in lesteners)
                {
                    UserAtConference user = new UserAtConference
                    {
                        Id        = lst.Id,
                        Name      = lst.Name,
                        Surname   = lst.Surname,
                        Direction = lst.Direction
                    };
                    if (lst.Image != null)
                    {
                        user.Image = lst.Image;
                    }
                    result.Add(user);
                }
            }

            return(PartialView("_GetListOfListener", result));
        }