Ejemplo n.º 1
0
        public async Task <List <PostModel> > GetAllAsync()
        {
            List <PostModel> posts = _postsDal.GetAll().ToList();

            foreach (PostModel post in posts)
            {
                UserModel userModel = await _loginManager.GetByIDWithoutPosts(post.UserID, false);

                post.User = userModel;
            }

            return(posts);
        }