Exemple #1
0
        /// <summary>
        ///     Retrieves a specific <see cref="!:CustomerPackModel" /> instance.
        /// </summary>
        /// <param name="id">
        ///     The unique value which distinctly identifies the <see cref="!:CustomerPackModel" /> instance to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref="!:CustomerPackModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found.
        /// </returns>
        public static Consensus.Contact.CustomerPack FetchById(ConsensusSite site, System.Int32 id)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Contact.ICustomerPackModel model = provider.Contact.CustomerPack.FetchById(id);
            return(model == null ? null : new Consensus.Contact.CustomerPack(model));
        }
Exemple #2
0
        /// <summary>
        ///     Creates a new <see cref="!:CustomerPackModel" /> instance.
        /// </summary>
        /// <returns>
        ///     A newly instantiated <see cref="!:CustomerPackModel" /> instance.
        /// </returns>
        public static Consensus.Contact.CustomerPack Create(ConsensusSite site)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Contact.ICustomerPackModel model = provider.Contact.CustomerPack.Create();
            return(model == null ? null : new Consensus.Contact.CustomerPack(model));
        }