예제 #1
0
 public IHttpActionResult GetAll()
 {
     try
     {
         IList <PagesModel> pages = _pagesService.GetAllAsync().Result;
         return(Ok(pages));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
예제 #2
0
 public async Task OnGet()
 {
     Pages = await _pagesService.GetAllAsync();
 }