Exemplo n.º 1
0
        public IActionResult GetAllPosts()
        {
            var post = aartistRepository.GetAllPost();
            // var profile = aartistRepository.GetProfileArtistByIdAtris(id);

            List <ViewModels.Post> posts = post.Select(item => new ViewModels.Post
            {
                Description = item.Description,
                Id          = item.Id,
                Title       = item.Title,
                Image       = Convert.ToBase64String(item.Image),
                //ImageProfile = Convert.ToBase64String(profile.ImageProfile),
                //NameProfile = profile.FullName
                UploadTime = item.UploadTime
            }).ToList();

            return(PartialView("_Posts", posts));
        }