public ActionResult SiteImageIcon(string reference, long id) { if (reference.ToLower() == "items") { var bytes = BinaryUtilities.SiteImageIcon(new SiteModel(id)); return(new FileContentResult(bytes, "image/png")); } else { return(null); } }
public FileContentResult SiteImageIcon(Context context, string reference, long id) { if (reference.ToLower() == "items") { var(bytes, contentType) = BinaryUtilities.SiteImageIcon( context: context, siteModel: new SiteModel(context: context, siteId: id)); return(new FileContentResult(bytes, contentType)); } else { return(null); } }