コード例 #1
0
        /// <summary>
        ///     Creates a new <see cref="!:PersonModel" /> instance.
        /// </summary>
        /// <returns>
        ///     A newly instantiated <see cref="!:PersonModel" /> instance.
        /// </returns>
        public static Consensus.Contact.Person Create(ConsensusSite site)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

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

            Consensus.Contact.IPersonModel model = provider.Contact.Person.FetchById(id);
            return(model == null ? null : new Consensus.Contact.Person(model));
        }
コード例 #3
0
        /// <summary>
        ///     Performs anonymise person on a single <see cref="!:PersonModel" /> instance.
        ///                     Functionality replicated from the SQL performed in V6.5.
        /// </summary>
        /// <param name="personId">
        ///     The value which identifies the <see cref="!:PersonModel" /> instance to be modified.
        /// </param>
        /// <returns>
        ///     The <see cref="!:PersonModel" /> instance that match the specified <paramref name="personId" />.
        /// </returns>
        public static Consensus.Contact.Person AnonymisePerson(ConsensusSite site, System.String personId)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Contact.IPersonModel model = provider.Contact.Person.AnonymisePerson(personId);
            return(model == null ? null : new Consensus.Contact.Person(model));
        }