After I setup the using/Imports statatements at the top of Program.cs file, at the Using Entity part, I was using the same code as stated in the tutorial:
// C#
// setup filter.
RelationPredicateBucket filter = new RelationPredicateBucket(CustomerFields.Country == "USA");
[colorvalue="FF0000"]EntityCollection<CustomerEntity> customers = new EntityCollection<CustomerEntity>();[/color] //**caused error
// fetch them using a DataAccessAdapter instance
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(customers, filter);
}
Console.WriteLine("Number of entities fetched: {0}", customers.Count);
// Display for each customer fetched the CustomerId and the CompanyName.
foreach(CustomerEntity c in customers)
{
Console.WriteLine("{0} {1}", c.CustomerId, c.CompanyName);
}
I kep getting eror :
error CS0308: The non-generic type 'Northwind.HelperClasses.EntityCollection' cannot be used with type arguments
I have using System.Collections.Generic; in my code
How can I fix this error?
Thanks,
lss