container = new WindsorContainer(store);
container.AddFacility("ibatis", new IBatisNetFacility());
container.AddFacility("ibatis", new IBatisNetFacility());
2、配置文件
<facilities>
<facility id="ibatis">
<sqlMap id="sqlServerSqlMap" config="sqlMap.config" />
</facility>
</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()));
}
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>
<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>