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