/// <summary>
        ///     Retrieves a collection of <see cref="!:PackXrefModel" /> instances.
        /// </summary>
        /// <param name="litIdId">
        ///     The value which identifies the <see cref="!:PackXrefModel" /> instances to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref="!:PackXrefModel" /> instances that match the specified <paramref name="litIdId" />.
        /// </returns>
        public static IEnumerable <Consensus.Document.PackXref> FetchAllByLitIdId(System.String litIdId)
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(PackXref.FetchAllByLitIdId(site, litIdId));
        }
        public static IEnumerable <Consensus.Document.PackXref> FetchAllByIcmIdId(System.Nullable <System.Int32> icmIdId)
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(PackXref.FetchAllByIcmIdId(site, icmIdId));
        }
        public static System.String GetTableName()
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(PackXref.GetTableName(site));
        }
        /// <summary>
        ///     Retrieves a specific <see cref="!:PackXrefModel" /> instance.
        /// </summary>
        /// <param name="id">
        ///     The unique value which distinctly identifies the <see cref="!:PackXrefModel" /> instance to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref="!:PackXrefModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found.
        /// </returns>
        public static Consensus.Document.PackXref FetchById(System.String id)
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(PackXref.FetchById(site, id));
        }
        /// <summary>
        ///     Retrieves all instances of the <see cref="!:PackXrefModel" /> class.
        /// </summary>
        /// <returns>
        ///     An enumerable collection of <see cref="!:PackXrefModel" /> instances.
        /// </returns>
        public static IEnumerable <Consensus.Document.PackXref> FetchAll()
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(PackXref.FetchAll(site));
        }
        /// <summary>
        ///     Creates a new <see cref="!:PackXrefModel" /> instance.
        /// </summary>
        /// <returns>
        ///     A newly instantiated <see cref="!:PackXrefModel" /> instance.
        /// </returns>
        public static Consensus.Document.PackXref Create()
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(PackXref.Create(site));
        }
 /// <summary>
 ///     Updates the seq for the pack xref records
 /// </summary>
 protected override void ResolveDependent()
 {
     base.ResolveDependent();
     if ((this.Seq == 0))
     {
         if (!string.IsNullOrEmpty(this.LitId.Id))
         {
             LocalPackXrefModel[] othercovers = this.PackId.PackId.Where(PackXref => PackXref.PackId.Id == this.PackId.Id && PackXref.Id != this.Id && (PackXref.Seq == 0) && PackXref.LitId.LtId.Type.Id == this.LitId.LtId.Type.Id).ToArray();
             othercovers.Execute(PackXref => PackXref.Seq = 99).Execute(PackXref => PackXref.Save());
         }
     }
 }