Back to UsefulDB4O in ASP.NET
<db4o> <databases> <database alias="ProductsDatabase" serverType="EmbeddedServer" fileDb4oPath="/App_Data/products.db4o" /> </databases> </db4o>Line 4: call the database "ProductsDatabase. "
Line 5: using the server type EmbeddedServer in the web application.
Line 6: define the relative path of the database file
<db4o> <databases> <database alias="UsersAndRoles" serverType="EmbeddedServer" fileDb4oPath="/App_Data/usersAndRoles.db4o" assemblyWithDatabaseConfig="AssemblyTest" staticMethodWithDatabaseConfig="AssemblyTest.DatabasesConfiguration.GetUsersAndRolesConfiguration" /> </databases> <db4o>
Line 7: name of the assembly that contains the method that returns the configurationthat we will open the database
Line 8: full signature of the method that returns the configuration that we will open the database.
<db4o> <databases> <database alias="UsersAndRoles" serverType="EmbeddedServer" openServerRetriesOnLock="10" fileDb4oPath="/App_Data/usersAndRoles.db4o" assemblyWithDatabaseConfig="WebApplicationTest" staticMethodWithDatabaseConfig="WebApplicationTest.DatabasesConfiguration.GetUsersAndRolesConfiguration" /> <database alias="Products" serverType="EmbeddedServer" openServerRetriesOnLock="10" fileDb4oPath="/App_Data/products.db4o" openContainerOnBeginRequest="true" filldb4oentityinfo="true" fillmode ="FillVersion,FillGlobalID" assemblyWithDatabaseConfig="WebApplicationTest" staticMethodWithDatabaseConfig="WebApplicationTest.DatabasesConfiguration.GetProductsConfiguration" /> </databases> </db4o>
Back to UsefulDB4O in ASP.NET