IBatisnet Facility 的几种配置

1、代码
         container = new WindsorContainer(store);
            container.AddFacility(
"ibatis"new IBatisNetFacility());

2、配置文件
<facilities>
  
<facility id="ibatis">
    
<sqlMap id="sqlServerSqlMap" config="sqlMap.config" />
  
</facility>
</facilities>

private static WindsorContainer container;

        
protected void Application_Start(object sender, EventArgs e)
        
{
            container 
= new WindsorContainer(new XmlInterpreter(new ConfigResource()));
        }

3、内嵌资源
<facilities>

    
<facility id="ibatis" type="Castle.Facilities.IBatisNetIntegration.IBatisNetFacility, Castle.Facilities.IBatisNetIntegration" >
      
<sqlMap id="sqlServerSqlMap" config="FES.Web.SqlMap.config, FES.Web" embedded="true" />
    
</facility>

</facilities>

posted on 2007-01-24 11:14  Daniel Pang  阅读(2493)  评论(5编辑  收藏  举报

导航