Is this a bug?

Posts   
 
    
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 23-Jul-2005 22:48:57   

Using adapter:

 foreach (EntityBase2 e in Entity.GetDependentRelatedEntities())
 {
      e.Validate();
 }

generates the following compile-time error:

statement cannot operate on variables of type 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollection2' because 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollection2' does not contain a public definition for 'GetEnumerator'

Is this a bug?

Thanks.

Jeff

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 23-Jul-2005 23:52:28   

Should be fixed in 1.0.2004.2, which version are you using?

Frans Bouma | Lead developer LLBLGen Pro
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 24-Jul-2005 00:25:10   

1.0.2004.2 Final May 26th 2005

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 24-Jul-2005 11:52:52   

oh, wait, you're using IEntityCollection2 as a type. You should cast the result to EntityCollectionBase2, then you can foreach over it. 'EntityCollection' also supports foreach, IEntityCollection2 doesn't as the interface indeed doesn't expose IEnumerable methods.

Frans Bouma | Lead developer LLBLGen Pro