/// <summary> /// Gets an instance of ContentHistory. /// </summary> /// <param name="guid"> guid </param> private void GetContentHistory(Guid guid) { using (IDataReader reader = DBContentHistory.GetOne(guid)) { PopulateFromReader(reader); } }
public static IDataReader GetPageAsReader( Guid contentGuid, int pageNumber, int pageSize, out int totalPages) { return(DBContentHistory.GetPage( contentGuid, pageNumber, pageSize, out totalPages)); }
/// <summary> /// Gets an IList with page of instances of ContentHistory. /// </summary> public static List <ContentHistory> GetPage( Guid contentGuid, int pageNumber, int pageSize, out int totalPages) { totalPages = 1; IDataReader reader = DBContentHistory.GetPage( contentGuid, pageNumber, pageSize, out totalPages); return(LoadListFromReader(reader)); }
/// <summary> /// Persists a new instance of ContentHistory. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { this.guid = Guid.NewGuid(); int rowsAffected = DBContentHistory.Create( this.guid, this.siteGuid, this.userGuid, this.contentGuid, this.title, this.contentText, this.customData, this.createdUtc, this.historyUtc); return(rowsAffected > 0); }
/// <summary> /// Gets a count of ContentHistory. /// </summary> public static int GetCount(Guid contentGuid) { return(DBContentHistory.GetCount(contentGuid)); }
public static bool DeleteByContent(Guid contentGuid) { return(DBContentHistory.DeleteByContent(contentGuid)); }
public static bool DeleteBySite(Guid siteGuid) { return(DBContentHistory.DeleteBySite(siteGuid)); }
/// <summary> /// Deletes an instance of ContentHistory. Returns true on success. /// </summary> /// <param name="guid"> guid </param> /// <returns>bool</returns> public static bool Delete(Guid guid) { return(DBContentHistory.Delete(guid)); }