public List <BlogDTO> GetAll() { List <Blog> blogs = _blogDAL.GetAll(); List <BlogDTO> blogsDTO = new List <BlogDTO>(); foreach (var blog in blogs) { blogsDTO.Add(BlogMapper(blog)); } return(blogsDTO); }
public List <Blog> GetAll() { return(_blogDal.GetAll().ToList()); }
public IActionResult AllBlogs() { return(View(bdb_Context.GetAll().Reverse().ToList())); }