LLBLGen: 2.0 Final (Oct 3rd, 2006)
Template Group:Adapter, 1 Class
Template Bindings (in order of precedence): SqlServerSpecific.NET20
SharedTemplates.NET20
SharedTemplates.BackwardsCompatibility.NET20
Database: SQLServer 2000
Compile Error:
Error 1 'EntityCollection' is an ambiguous reference between 'HLPUSD.QQest.DAL.HelperClasses.EntityCollection<HLPUSD.QQest.DAL.EntityClasses.EmpMainEntity>' and 'SD.LLBLGen.Pro.ORMSupportClasses.EntityCollection<HLPUSD.QQest.DAL.EntityClasses.EmpMainEntity>' C:\Documents and Settings\NJDeVore\My Documents\Visual Studio 2005\Projects\HLPUSD.QQest.BL\EmployeeManager.cs 37 16 HLPUSD.QQest.BL
I understand what this error means, but I'm at a loss as to how to resolve it. Obviously, the top of my class looks like this for my usings:
using HLPUSD.QQest.DAL;
using HLPUSD.QQest.DAL.HelperClasses;
using HLPUSD.QQest.DAL.EntityClasses;
using HLPUSD.QQest.DAL.FactoryClasses;
using HLPUSD.QQest.DAL.DatabaseSpecific;
using SD.LLBLGen.Pro.ORMSupportClasses;
...and then here's an example of a function that won't compile:
public EntityCollection<EmpMainEntity> GetAllEmployees()
{
EntityCollection<EmpMainEntity> empList = new EntityCollection<EmpMainEntity>(new EmpMainEntityFactory());
IRelationPredicateBucket empFilter = new RelationPredicateBucket();
empFilter.PredicateExpression.Add(EmpMainFields.ActiveYn == 1);
if (_departmentFilter.Length > 0)
empFilter.PredicateExpression.AddWithAnd(new FieldCompareSetPredicate(EmpMainFields.DepartmentId,null,TblDepartmentFields.DepartmentId,null, SetOperator.In,(TblDepartmentFields.DepartmentId == _departmentFilter | TblDepartmentFields.ParentId == _departmentFilter)));
IPrefetchPath2 empPrefetch = new PrefetchPath2((int)EntityType.EmpMainEntity);
empPrefetch.Add(EmpMainEntity.PrefetchPathTimeWorkingPunch).Filter.Add(TimeWorkingPunchFields.InpunchDt == DateTime.Today).AddWithAnd(TimeWorkingPunchFields.ActiveYn == 1);
empPrefetch.Add(EmpMainEntity.PrefetchPathUserLogin).SubPath.Add(UserLoginEntity.PrefetchPathUserRequestAbsence ).Filter.Add(UserRequestAbsenceFields.AbsencestartDt >= DateTime.Today);
empPrefetch.Add(EmpMainEntity.PrefetchPathEmpAbsenceUsed).Filter.Add(EmpAbsenceUsedFields.UsedDt >= DateTime.Today);
using (DataAccessAdapter da = new DataAccessAdapter())
{
da.FetchEntityCollection(empList, empFilter, empPrefetch);
}
return empList;
}
...now, as you can see I'm using the TblDepartmentFields to get at the field names, so I need to include the DAL.HelperClasses reference but also I need the ORMSupportClasses. Where am I going wrong?