There is no 'easy' way I'm afraid. You can re-instantiate the enum type, grab the field index if you like, but the factories work with overloading, and the Enum methods return object, so it will not compile.
a couple of solutions:
pass along the entity enum value also, so you can create an EntityFields object, using the EntityFieldsFactory class. You'll get back an EntityFields object which accepts a string indexer, like this:
IEntityField field = (EntityFieldsFactory.Create(entityEnumValue))[fieldName];
You then have the field, and you can create FieldCompareValue objects for example, bypassing the predicate factory (which does the same thing: create an entity field object and then create the predicate objects).
Another solution could be that you set up a template which generates switch statements and returns per entity type teh enum value based on the field name.
Another solution could be that you re-instantiate an empty new entity, then grab the field through the indexer and create the fields.
If you need help with this, please post your code and your questions in this thread
@Netclectic: I had that too, however I wasn't sure if he new the enum type
THanks for posting that