/// <summary> /// Retrieves a specific <see cref="!:PaymentModel" /> instance. /// </summary> /// <param name="id"> /// The unique value which distinctly identifies the <see cref="!:PaymentModel" /> instance to be returned. /// </param> /// <returns> /// The <see cref="!:PaymentModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found. /// </returns> public static Consensus.Finance.Payment FetchById(ConsensusSite site, System.String id) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Finance.IPaymentModel model = provider.Finance.Payment.FetchById(id); return(model == null ? null : new Consensus.Finance.Payment(model)); }
/// <summary> /// Creates a new <see cref="!:PaymentModel" /> instance. /// </summary> /// <returns> /// A newly instantiated <see cref="!:PaymentModel" /> instance. /// </returns> public static Consensus.Finance.Payment Create(ConsensusSite site) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Finance.IPaymentModel model = provider.Finance.Payment.Create(); return(model == null ? null : new Consensus.Finance.Payment(model)); }