コード例 #1
0
        public IHttpActionResult ListAllPhoto()
        {
            List <PhotoModel> photos = new List <PhotoModel>();

            photos = photorepo.AllPhoto();
            return(Ok(photos));
        }
コード例 #2
0
        public JsonResult ListAllPhoto()
        {
            var photo      = photorepo.AllPhoto();
            var jsonResult = Json(photo, JsonRequestBehavior.AllowGet);

            jsonResult.MaxJsonLength = int.MaxValue;
            return(jsonResult);
        }