public JsonResult PhotoDetail(int id) { var result = photorepo.PhotoDetail(id); var jsonResult = Json(result, JsonRequestBehavior.AllowGet); return(jsonResult); }