Given the following:
List<IEntity2> entityList = new List<IEntity2>();
entityList.Add(new CustomerEntity());
entityList.Add(new EmployeeEntity());
entityList.Add(new OrderEntity());
entityList.Add(new CustomerEntity());
entityList.Add(new ProductEntity());
I have two questions. First, what is the best way for me to get a List<CustomerEntity> from the entityList above?
Second, what is the best way for me to do a foreach loop and find the CustomerEntity objects in entityList?
foreach (IEntity2 entity in entityList)
{
Assert.AreEqual(entity.LLBLGenProEntityName, EntityType.CustomerEntity.ToString());
}