public IHttpActionResult ListAllPhoto() { List <PhotoModel> photos = new List <PhotoModel>(); photos = photorepo.AllPhoto(); return(Ok(photos)); }
public JsonResult ListAllPhoto() { var photo = photorepo.AllPhoto(); var jsonResult = Json(photo, JsonRequestBehavior.AllowGet); jsonResult.MaxJsonLength = int.MaxValue; return(jsonResult); }