Click here to Skip to main content
15,892,674 members
Articles / Web Development / ASP.NET

An introduction to LINQ for db4o

Rate me:
Please Sign up or sign in to vote.
4.77/5 (23 votes)
8 May 2008CPOL17 min read 95K   999   60  
A demo web application for demonstrating the power of LINQ for db4o.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Db4objects.Db4o;
using Db4objects.Db4o.Linq;
using DataObjecten;

namespace DemoWebSite
{
    public partial class ListViewDemo : System.Web.UI.Page
    {
        protected void Page_PreRender(object sender, EventArgs e)
        {
             // Just show all the employees in the ListView. The ListView itself is handeling the paging support.
            ListEmployees.DataSource = (from Employee emp in db4oManager.Client select (Employee)emp).ToList(); 
             ListEmployees.DataBind();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Mirabeau bv
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions