Exemplo n.º 1
0
        private void AppendNamedSqlQuery(SqlNamedQueryAttribute attribute, Assembly assembly)
        {
            if (attribute.Name == "" || attribute.Query == "")
            {
                throw new ActiveRecordException("Error generating XML for SqlNamedQuery in " + assembly.FullName +
                                                ". Query must have both name and query.");
            }

            xml.AppendFormat(@"
	<sql-query name='{0}'>
		 <![CDATA[{1}]]>
	 </sql-query>
", attribute.Name, attribute.Query);
        }
		private void AppendNamedSqlQuery(SqlNamedQueryAttribute attribute, Assembly assembly)
		{
			if (attribute.Name == "" || attribute.Query == "")
			{
				throw new ActiveRecordException("Error generating XML for SqlNamedQuery in " + assembly.FullName +
												". Query must have both name and query.");
			}

			xml.AppendFormat(@"
	<sql-query name='{0}'>
		 <![CDATA[{1}]]>
	 </sql-query>
", attribute.Name, attribute.Query);

		}