/// <summary> /// Gets an IList with page of instances of RedirectList. /// </summary> public static List <RedirectInfo> GetPage(int siteId, int pageNumber, int pageSize, out int totalPages) { totalPages = 1; IDataReader reader = DBRedirectList.GetPage(siteId, pageNumber, pageSize, out totalPages); return(LoadListFromReader(reader)); }
/// <summary> /// Gets an instance of RedirectList. /// </summary> /// <param name="rowGuid"> rowGuid </param> private void GetRedirectList(Guid rowGuid) { using (IDataReader reader = DBRedirectList.GetOne(rowGuid)) { PopulateFromReader(reader); } }
/// <summary> /// Updates this instance of RedirectList. Returns true on success. /// </summary> /// <returns>bool</returns> private bool Update() { return(DBRedirectList.Update( this.rowGuid, this.oldUrl, this.newUrl, this.expireUtc)); }
/// <summary> /// Updates this instance of RedirectList. Returns true on success. /// </summary> /// <returns>bool</returns> private bool Update() { //https://www.mojoportal.com/Forums/Thread.aspx?pageid=5&t=11174~1#post46572 if (string.IsNullOrEmpty(this.oldUrl)) { return(false); } return(DBRedirectList.Update( this.rowGuid, this.oldUrl, this.newUrl, this.expireUtc)); }
/// <summary> /// Persists a new instance of RedirectList. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { this.rowGuid = Guid.NewGuid(); int rowsAffected = DBRedirectList.Create( this.rowGuid, this.siteGuid, this.siteId, this.oldUrl, this.newUrl, this.createdUtc, this.expireUtc); return(rowsAffected > 0); }
/// <summary> /// Persists a new instance of RedirectList. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { this.rowGuid = Guid.NewGuid(); //https://www.mojoportal.com/Forums/Thread.aspx?pageid=5&t=11174~1#post46572 if (string.IsNullOrEmpty(this.oldUrl)) { return(false); } int rowsAffected = DBRedirectList.Create( this.rowGuid, this.siteGuid, this.siteId, this.oldUrl, this.newUrl, this.createdUtc, this.expireUtc); return(rowsAffected > 0); }
/// <summary> /// returns true if the record exists /// </summary> public static bool Exists(int siteId, string oldUrl) { return(DBRedirectList.Exists(siteId, oldUrl)); }
/// <summary> /// Gets an IDataReader with one row from the mp_RedirectList table. /// </summary> public static IDataReader GetBySiteAndUrl(int siteId, string oldUrl) { return(DBRedirectList.GetBySiteAndUrl(siteId, oldUrl)); }
/// <summary> /// Gets a count of RedirectList. /// </summary> public static int GetCount(int siteId) { return(DBRedirectList.GetCount(siteId)); }
/// <summary> /// Deletes an instance of RedirectList. Returns true on success. /// </summary> /// <param name="rowGuid"> rowGuid </param> /// <returns>bool</returns> public static bool Delete(Guid rowGuid) { return(DBRedirectList.Delete(rowGuid)); }