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