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 >

你可能感兴趣的:(ibatis)