Ejemplo n.º 1
0
        /// <summary>
        /// Ensures that an object with the specified name exists, while creating other properties are set to their default values
        /// </summary>
        /// <param name="i_sName">Name</param>
        /// <returns>cDesignation object</returns>
        public static cDesignation CreateIfRequiredAndGet(string i_sName)
        {
            cDesignation oObj = cDesignation.Get_Name(i_sName);

            if (oObj == null)
            {
                oObj       = cDesignation.Create();
                oObj.sName = i_sName;
                oObj.Save();
            }
            return(oObj);
        }