Using the Customers class defined here http://databroker.codeplex.com/Wiki/View.aspx?titleDefining%20a%20DAO&referringTitleHome we can write the following code that will return all Customers where the Fax column is NULL:

using System;
using System.Collections.Generic;
using System.Linq;
using DataBroker.Criteria;
using DataBroker.Dal;
using DataBroker.Dao;
using NorthwindDAO;
using System.Collections.Generic;

public class Program
 {
        static void Main(string[] args)
        {
            D2Bk.ChangeDatabase("Northwind");
            Filter f    = new Filter();
            f.Add("Fax", Operator.IsNull);
            List<Entity> customers = D2Bk.Fetch(f, new Customers());
        }
}

Last edited Mar 2, 2009 at 7:44 PM by dbroker, version 3

Comments

No comments yet.