GetMulti(EntityQuery) overload error

Posts   
 
    
David H
User
Posts: 100
Joined: 31-Dec-2004
# Posted on: 24-Oct-2012 04:41:56   

Using the following code from the Framework Examples I am getting an invalid argument error on the GetMulti function. Apparently, the development environment is not seeing the overload for the EntityQuery type.

[TestMethod()]
        public void GetCustomersWithoutAnyFilterTest()
        {
            //LinqMetaData metaData = new LinqMetaData();
            //var q = metaData.Customer;
            //List<CustomerEntity> customers = q.ToList();

            var qf = new QueryFactory();
            var customers = new CustomerCollection();
            customers.GetMulti(qf.Customer);
            Assert.AreEqual(91, customers.Count);
        }

The IDE messages are:

Error 3 The best overloaded method match for 'SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase<Northwind.DAL.EntityClasses.CustomerEntity>. GetMulti(SD.LLBLGen.Pro.ORMSupportClasses.IPredicate)' has some invalid arguments C:\My\EXAMPLES\NorthwindeCS1\UnitTests\MainFormTest.cs 97 13 UnitTests

and

Error 4 Argument 1: cannot convert from 'SD.LLBLGen.Pro.QuerySpec.EntityQuery<Northwind.DAL.EntityClasses.CustomerEntity>' to 'SD.LLBLGen.Pro.ORMSupportClasses.IPredicate' C:\My\EXAMPLES\NorthwindeCS1\UnitTests\MainFormTest.cs 97 32 UnitTests

Using 3.5 Final 6/27/2012 Visual Studio 2010.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 24-Oct-2012 08:03:22   

Hi David,

You need to add the following 'using' as stated in the docs:

using SD.LLBLGen.Pro.QuerySpec.SelfServicing;
David Elizondo | LLBLGen Support Team