Hi,
I have an entity Product which has a bag with its revisions
ProductRevision called Revisions, the unique use of this collection
Revision is obtaining the active revision, so in each class which has
revisions we have something like this
// Revisions collection
public virtual IList<ProductRev> Revisions
{
get { return revisions; }
set { revisions = value; }
}
//Obtaining the revision which is active
public virtual ProductRev ActiveRevision
{
get
{
foreach (ProductRev rev in this.Revisions)
{
if (rev.Active)
return rev;
}
return new UnknownProductRev();
}
}
I was wondering if isn't there the option to specify a filter for a
many-to-one association (like formula in property) to retrieve just
the active revision without doing it programmatically.
thanks in advance,
Luigi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---