I am trying to use this answer from an old post:
Display image from database in asp mvc
which is:
public class ImageController
{
public ActionResult Show( int id )
{
var imageData = ...get bytes from database...
return File( imageData, "image/jpg" );
}
}
and I'm getting the following error:
'System.IO.File' is a 'type' but is used like a 'variable'
This is what I'm using:
using System;
using System.IO;
using System.Drawing.Imaging;
using System.Web.Mvc;
What am I missing?