Volver al Inicio
UsefulDB4O te permite usar db4o de forma fácil en el entorno de ASP.NET
Pasos para comenzar
<httpModules> <add name="DB4OHttpModule" type="UsefulDB4O.Web.DB4OHttpModule, UsefulDB4O"/> </httpModules>
<configSections> <section name="db4o" type="UsefulDB4O.ApplicationConfig.DB4OConfigSection"/> </configSections>
Para ver más información sobre los atributos del elemento database, ir a esta página.<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); }
Índice de páginas de UsefulDB4O en ASP.NET