title: ASP.NET MVC Displaying Multiple Images from Database. How to- Efficiently
body: <p>I've got a .NET MVC app where I need to display a list of images with some text. The images and text are stored in the database in the same table, and returned in my simple model. What I haven't figured out is how to display all of these images without hitting the database again for every single image.</p>
  
  <p>I see several examples, such as:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/4142492/asp-net-mvc-loading-images-from-database-and-displaying-their-in-view">ASP.NET MVC: loading images from database and displaying their in view</a></li>
  <li><a href="https://stackoverflow.com/questions/2448150/problem-with-displaying-image-from-db-using-asp-net-mvc-2">Problem with displaying image from DB using asp.net MVC 2</a></li>
  </ul>
  
  <p>and others, but they all go back to the database for every image. That doesn't make sense, because there could be dozens of images, and I don't want to keep making single calls to the database when I already have the image data returned in my model. </p>
  
  <p>I'm new to ASP.NET MVC, (and also never worked with images stored in a DB before) and I think I am just missing something, and that it can't be this difficult. If anyone has solved this, I'd love to hear it, and I think others would too, based on the other questions already here.</p>