hunostor

controller from database to file, return on web

Nov 23rd, 2018
298
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.24 KB | None | 0 0
  1. // Copy in controller
  2.  
  3.         // GET: Image
  4.         public ActionResult Get(int id)
  5.         {
  6.             var egyfoto = db.Fenykepek.SingleOrDefault(f => f.FenykepId == id);
  7.             return File(egyfoto.Kep, "image/jpeg");
  8.         }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment