我想知道如何构建一个Web应用程序,每个功能使用一个文件夹(Customers,Orders),而不是每个工件类型一个文件夹(Controllers,Views); 这似乎是组织具有大量功能的大型项目的更好方法,但我找不到任何有关它的信息.
我认为使用区域不是一个解决方案,因为每个功能使用一个区域需要创建大量嵌套文件夹.
我认为通过自定义IViewEngine实现应该可以实现我想做的事情,但我不确定.
有没有人试过这样做?
我想使用新的VS2010 web.config转换功能来更改web.config文件中nhibernate配置中的连接字符串.相关的代码片段是这样的:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
<property name="connection.connection_string">(test connection string)</property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
...
Run Code Online (Sandbox Code Playgroud)
我没有成功地尝试了以下转换:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory>
<property name="connection.connection_string" xdt:Transform="Replace">(production connection string)</property>
</session-factory>
</hibernate-configuration>
</configuration>
Run Code Online (Sandbox Code Playgroud)
问题似乎是在nhibernate-configuration元素的xmlns属性中.
在部署期间,用(生产连接字符串)替换(测试连接字符串)的正确转换应该是什么?
给定一个可以安装在GAC(生产)或不安装(开发)的类库DLL,我需要知道执行程序集是否从GAC运行.我怎么知道这个?