Ejemplo n.º 1
0
        /// <summary>
        ///     Creates a new <see cref="!:CodeModel" /> instance.
        /// </summary>
        /// <returns>
        ///     A newly instantiated <see cref="!:CodeModel" /> instance.
        /// </returns>
        public static Consensus.Common.Code Create(ConsensusSite site)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Common.ICodeModel model = provider.Common.Code.Create();
            return(model == null ? null : new Consensus.Common.Code(model));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Retrieves a specific <see cref="!:CodeModel" /> instance.
        /// </summary>
        /// <param name="id">
        ///     The unique value which distinctly identifies the <see cref="!:CodeModel" /> instance to be returned.
        /// </param>
        /// <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.Common.Code FetchById(ConsensusSite site, System.String id)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Common.ICodeModel model = provider.Common.Code.FetchById(id);
            return(model == null ? null : new Consensus.Common.Code(model));
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Retrieves a single <see cref="!:CodeModel" /> instance from the data store.
        /// </summary>
        /// <param name="codeValue3">
        ///     The unique value which distinctly identifies the <see cref="!:CodeModel" /> instance to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref="!:CodeModel" /> instance that matches the specified <paramref name="codeValue3" />; or null, if no matching instance can be found.
        /// </returns>
        public static Consensus.Common.Code FetchByTypeAndCodeValue3(ConsensusSite site, System.String codeType, System.String codeValue3)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Common.ICodeModel model = provider.Common.Code.FetchByTypeAndCodeValue3(codeType, codeValue3);
            return(model == null ? null : new Consensus.Common.Code(model));
        }