Configuring NBusiness

Below is an example of how to setup your .config file to get NBusiness working
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
   <configSections>
      <section name="NBusiness" type="NBusiness.Data.Settings"/>
   </configSections>
   <connectionStrings>
      <add name="Example" 
          connectionString="…" 
          providerName="System.Data.SqlClient" />
   </connectionStrings>
   <!—Other configuration settings here !-->
   <NBusiness ConnectionStringName="Example" 
              ProviderType="NBusiness.Providers.SqlDatabaseProvider, NBusiness"
              AccessDefault="false"
              AuthorizeDefault="false" />
</configuration>

  • ConnectionStringName: Specifies which connection string your DatabaseProvider should use.
  • ProviderType: [Optional] Specifies the type to be use as the DatabaseProvider. Uses the SqlDatabaseProvider by default.
  • AccessDefault: [Optional] Specifies that no fields may be accessed by any role by default.
  • AuthorizeDefault: [Optional] Specifies that no entities may be fetched/inserted/updated/deleted by any role by default.

Last edited Sep 16, 2007 at 5:54 AM by justinc, version 1

Comments

No comments yet.