Exemplo 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>cCountry object</returns>
        public static cCountry CreateIfRequiredAndGet(string i_sName)
        {
            cCountry oObj = cCountry.Get_Name(i_sName);

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