Is there a target for type safe collection in 2.0. something like generics
DataAccessAdapter adapter = new DataAccessAdapter( );
EntityCollection< CEntity > c = new EntityCollection< CEntity >( new CEntityFactory( ) );
adapter.FetchEntityCollection( c, null );
What about Stored Procedures!!!
Is the design now to call the sp, then interrate though the DataTable and build Entity objects then store them into the Entity Collection. It would be nice to pass a delegate to the factory or the Adapter and populate the EntityCollection object within the framework. Just to have the factory/adapter or what you think would be a good place to call this.
something like this. (sorry for the generic syntax that does not exsist, just want it!)
// delegate definition
public delegate void StoredProcedure( );
public StoredProcedure sp;
DataAccessAdapter adapter = new DataAccessAdapter( );
sp += new StoredProcedure (RetrievalProcedures.spRylandComCommunityExtract);
EntityCollection< CEntity > c = new EntityCollection< CEntity >(new CEntityFactory( sp ) );
Or
adapter.FetchEntityCollection( c, null, sp );
I don't know what you have in mind for this. Could you throw so idea out too. I don't know if you had some reason that you did not want to do this, could you share it with us. Thanks.