Restricting the related entites returned

Posts   
 
    
Posts: 2
Joined: 03-Dec-2007
# Posted on: 10-Jan-2008 10:25:10   

Hi!

I'm using Version 2.0.0.0 final, SelfServicing .Net 2.0 against a SQL Server 2000 DB (8.0).

I'm going to give a simplified version of my problem in hopes of making things a little easier.

I have a Customer table and an Orders table. Each Customer can have multiple orders. You can access the Order collection like so:

Customer.Orders;

Now the Order table has a flag called "Active" which basically means the same thing as deleted. I want to insure that when I call "Customer.Orders" I never get an order record with the active flag turned off. Essentially I want to insure that the following predicate:

OrderFields.Active == true;

is attached to each call to Customer.Orders;

I hope that's clear, and that there is a solutions simple_smile

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 10-Jan-2008 10:32:23