Exemple #1
0
        public IHttpActionResult ListAllPhoto()
        {
            List <PhotoModel> photos = new List <PhotoModel>();

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

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