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