Back to Home
UsefulDB4O db4o allows you to easily use the ASP.NET environment
Steps to start
<httpModules> <add name="DB4OHttpModule" type="UsefulDB4O.Web.DB4OHttpModule, UsefulDB4O"/> </httpModules>
<configSections> <section name="db4o" type="UsefulDB4O.ApplicationConfig.DB4OConfigSection"/> </configSections>
<db4o> <databases> <database alias="ProductsDatabase" serverType="EmbeddedServer" fileDb4oPath="/App_Data/products.db4o" /> </databases> </db4o>
protected void Page_Load(object sender, EventArgs e) { var productsContainer = UsefulDB4O.Web.DB4ODatabases.GetCurrentContextContainer("ProductsDatabase"); var category = new Category { CategoryID = Guid.NewGuid(), Name = "Cars", Products = new Collection<Product>() }; productsContainer.Store(category); }
Index of UsefulDB4O in ASP.NET