コード例 #1
0
        //---------------------------------------------------------------------------------------------------------------------

        /// <summary>Creates a new AuthenticationType instance representing the authentication type with the specified database identifier.</summary>
        /// <param name="context">The execution environment context.</param>
        /// <param name="identifier">The database identifier of the authentication type.</param>
        /// <returns>The created AuthenticationType object.</returns>
        public static AuthenticationType FromIdentifier(IfyContext context, string identifier)
        {
            EntityType         entityType = EntityType.GetEntityType(typeof(AuthenticationType));
            AuthenticationType result     = (AuthenticationType)entityType.GetEntityInstanceFromIdentifier(context, identifier);

            result.Identifier = identifier;
            result.Load();
            return(result);
        }
コード例 #2
0
        //---------------------------------------------------------------------------------------------------------------------

        /// <summary>Creates a new AuthenticationType instance representing the authentication type with the specified database ID.</summary>
        /// <param name="context">The execution environment context.</param>
        /// <param name="id">The database ID of the authentication type.</param>
        /// <returns>The created AuthenticationType object.</returns>
        public static AuthenticationType FromId(IfyContext context, int id)
        {
            EntityType         entityType = EntityType.GetEntityType(typeof(AuthenticationType));
            AuthenticationType result     = (AuthenticationType)entityType.GetEntityInstanceFromId(context, id);

            result.Id = id;
            result.Load();
            return(result);
        }