1. 程式人生 > >C#.Net Castle ActiveRecord學習實踐(9):使用ActiveRecord的一些技巧

C#.Net Castle ActiveRecord學習實踐(9):使用ActiveRecord的一些技巧

None.gif<?xml version="1.0" encoding="utf-8" ?>
None.gif
None.gif
<configuration>
None.gif
None.gif    
<configSections>
None.gif
None.gif        
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
None.gif
None.gif        
<section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord"
/>
None.gif
None.gif        
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
None.gif
None.gif    
</configSections>
None.gif
None.gif    
<activerecord>     
None.gif
None.gif    
</activerecord>
None.gif
None.gif    
<log4net>
None.gif
None.gif        
<!-- Define some output appenders -->
None.gif
None.gif        
<appener name="trace" type="log4net.Appender.TraceAppender, log4net"
>Õ
None.gif
None.gif            
<layout type="log4net.Layout.PatternLayout,log4net">
None.gif
None.gif                
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%P{user}&gt; - %m%n"/>
None.gif
None.gif            
</layout>
None.gif
None.gif        
</appener>Õ
None.gif
None.gif        
<appener name="console" type="log4net.Appender.ConsoleAppender, log4net"
>Õ
None.gif
None.gif            
<layout type="log4net.Layout.PatternLayout,log4net">
None.gif
None.gif                
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%P{user}&gt; - %m%n"/>
None.gif
None.gif            
</layout>
None.gif
None.gif        
</appener>Õ
None.gif
None.gif        
<appener name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net">Õ
None.gif
None.gif            
<param name="File" value="log.txt"/>
None.gif
None.gif            
<param name="AppendToFile" value="true"/>
None.gif
None.gif            
<param name="RollingStyle" value="Date"/>
None.gif
None.gif            
<param name="DatePattern" value="yyyy.MM.dd"/>
None.gif
None.gif            
<param name="StaticLogFileName" value="true"/>
None.gif
None.gif            
<layout type="log4net.Layout.PatternLayout,log4net">
None.gif
None.gif                
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n"/>
None.gif
None.gif            
</layout>
None.gif
None.gif        
</appener>Õ
None.gif
None.gif        
<root>
None.gif
None.gif            
<!-- priority value can be set to ALL|INFO|WARN|ERROR -->
None.gif
None.gif            
<priority value="ALL"/>
None.gif
None.gif            
<appener-ref ref="rollingFile"/>Õ
None.gif
None.gif        
</root>
None.gif
None.gif    
</log4net>
None.gif
None.gif    
<nhibernate>
None.gif
None.gif        
<!-- with this set to true, SQL statements will output to the console window if it's a console app -->
None.gif
None.gif        
<add key="hibernate.show_sql" value="true"/>
None.gif
None.gif    
</nhibernate>
None.gif
None.gif
</configuration>