コード例 #1
0
        /// <summary>
        ///     Retrieves a specific <see cref="!:BranchXrefModel" /> instance.
        /// </summary>
        /// <param name="id">
        ///     The unique value which distinctly identifies the <see cref="!:BranchXrefModel" /> instance to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref="!:BranchXrefModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found.
        /// </returns>
        public static Consensus.Membership.BranchXref FetchById(ConsensusSite site, System.String id)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Membership.IBranchXrefModel model = provider.Membership.BranchXref.FetchById(id);
            return(model == null ? null : new Consensus.Membership.BranchXref(model));
        }
コード例 #2
0
        /// <summary>
        ///     Creates a new <see cref="!:BranchXrefModel" /> instance.
        /// </summary>
        /// <returns>
        ///     A newly instantiated <see cref="!:BranchXrefModel" /> instance.
        /// </returns>
        public static Consensus.Membership.BranchXref Create(ConsensusSite site)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Membership.IBranchXrefModel model = provider.Membership.BranchXref.Create();
            return(model == null ? null : new Consensus.Membership.BranchXref(model));
        }