Guys,
I'm trying to use the data source control using code such as
suppliersDataSource.DataContainerType = DataSourceDataContainerType.EntityCollection;
suppliersDataSource.EntityCollection = suppliers;
Presumably this is all I need to create the data source and then use it to bind to a control such as GridView. However when I do this I get a compilation error
C:\Documents and Settings\MADA\My Documents\Visual Studio 2005\WebSites\TestLLBGen\Default.aspx.cs(35,48 ): error CS0266: Cannot implicitly convert type 'BottomLine.SprinterNet.CollectionClasses.SupplierCollection' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollection2'. An explicit conversion exists (are you missing a cast?)
If I review the generated code for SupplierCollection
[Serializable]
public partial class SupplierCollection : EntityCollectionBase<SupplierEntity>
and then the definition for EntityCollectionBase is
// Summary:
// Implementation of the entity collection base class.
[Serializable]
public abstract class EntityCollectionBase<TEntity> : CollectionCore<TEntity>, IEntityCollection, IEnumerable, ITransactionalElement, IXmlSerializable, IListSource, SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollectionAccess, SD.LLBLGen.Pro.ORMSupportClasses.ICollectionMaintenance where TEntity : SD.LLBLGen.Pro.ORMSupportClasses.EntityBase, SD.LLBLGen.Pro.ORMSupportClasses.IEntity
You can see it only implements IEntityCollection and not IEntityCollection2
Any ideas how I can progress this?
Cheers
Matt