public void OnGet(int id)
        {
            Id   = id;
            user = _usersRepository.GetUser(id);

            AllComments = _commentsRepository.GetList(id);

            foreach (var a in AllComments)
            {
                if (AllComments == null)
                {
                    AllComments = new List <Comments>();
                }
                AllComments.AddRange(_commentsRepository.GetList(a.Id));
            }
        }
Пример #2
0
        public Register GetUser(string id)
        {
            var user = userRepository.GetUser(id);

            return(user);
        }