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

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

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