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

            Consensus.Finance.IDirectDebitModel model = provider.Finance.DirectDebit.FetchById(id);
            return(model == null ? null : new Consensus.Finance.DirectDebit(model));
        }
コード例 #2
0
        /// <summary>
        ///     Creates a new <see cref="!:DirectDebitModel" /> instance.
        /// </summary>
        /// <returns>
        ///     A newly instantiated <see cref="!:DirectDebitModel" /> instance.
        /// </returns>
        public static Consensus.Finance.DirectDebit Create(ConsensusSite site)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Finance.IDirectDebitModel model = provider.Finance.DirectDebit.Create();
            return(model == null ? null : new Consensus.Finance.DirectDebit(model));
        }