Example #1
0
 /// <summary>
 /// Retrieving all the wiki pages whose ID is within the given range
 /// </summary>
 /// <param name="fromID">starting ID of the range</param>
 /// <param name="toID">ending ID of the range</param>
 /// <returns>list of pages</returns>
 public List<Page> GetPageByIDInRange(int fromID, int toID)
 {
     using (var ctx = new WikipediaEntities())
     {
         return ctx.Pages.Where(p => p.PageID > fromID && p.PageID <= toID).ToList();
     }
 }
Example #2
0
 /// <summary>
 /// Retrieving all the wiki pages whose ID is within the given range
 /// </summary>
 /// <param name="fromID">starting ID of the range</param>
 /// <param name="toID">ending ID of the range</param>
 /// <returns>list of pages</returns>
 public List <Page> GetPageByIDInRange(int fromID, int toID)
 {
     using (var ctx = new WikipediaEntities())
     {
         return(ctx.Pages.Where(p => p.PageID > fromID && p.PageID <= toID).ToList());
     }
 }
Example #3
0
 /// <summary>
 /// Retrieving the page by ID
 /// </summary>
 /// <param name="id">the id of the page to be retrieved</param>
 /// <returns>The fetched Wikipedia page</returns>
 public Page GetPageByID(int id)
 {
     using (var ctx = new WikipediaEntities())
     {
         return ctx.Pages.Where(p => p.PageID == id).FirstOrDefault();
     }
 }
Example #4
0
 /// <summary>
 /// Retrieving the page by ID
 /// </summary>
 /// <param name="id">the id of the page to be retrieved</param>
 /// <returns>The fetched Wikipedia page</returns>
 public Page GetPageByID(int id)
 {
     using (var ctx = new WikipediaEntities())
     {
         return(ctx.Pages.Where(p => p.PageID == id).FirstOrDefault());
     }
 }