Hi,
Do you have any idea why the following code might give an 'Object reference not set to an instance of an object' exception?
EntityCollection collection = new EntityCollection(new NewsarticleEntityFactory());
adapter.GetDbCount(collection, null);
Here is the stack trace...
[NullReferenceException: Object reference not set to an instance of an object.]
SD.LLBLGen.Pro.DQE.SqlServer.SqlServerSpecificCreator.CreateObjectName(IFieldPersistenceInfo persistenceInfo)
SD.LLBLGen.Pro.DQE.SqlServer.SqlServerSpecificCreator.CreateFieldName(IFieldPersistenceInfo persistenceInfo, String fieldName, String objectAlias, Boolean appendAlias)
SD.LLBLGen.Pro.DQE.SqlServer.SqlServerSpecificCreator.CreateFieldName(IEntityFieldCore fieldCore, IFieldPersistenceInfo persistenceInfo, String fieldName, String objectAlias, Int32& uniqueMarker, Boolean applyAggregateFunction)
SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32& uniqueMarker)
SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateRowCountDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause)
NWN.DatabaseSpecific.DataAccessAdapter.CreateRowCountDQ(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfoObjects, IPredicateExpression filter, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityFields2 fields, IRelationPredicateBucket filter, IGroupByCollection groupByClause, Boolean allowDuplicates)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityCollection2 collection, IRelationPredicateBucket filter)
Cheers,
Ian.