EntityFieldFactory no longer generated/visible

Posts   
 
    
yowl
User
Posts: 266
Joined: 11-Feb-2008
# Posted on: 07-Aug-2018 01:44:04   

Hi,

LLBLGen 5.4.2 Adapter C# SQL Server

Today upgraded to 5.4.2 and brought our presets and entityAdapter.template up to date with the shipped versions (plus our additions).

Has EntityFieldFactory been removed, not in 5.4.2 necessarily, could have been some time ago as we've not updated the templates/preset in a long time?

We used to use expose it so we could dynamically create IEntityField2 from strings:

        public IEntityField2 Create(string criteriaEntityType, string criteriaEntityField)
        {
            return EntityFieldFactory.Create(criteriaEntityType, criteriaEntityField);
        }

The file EntityFieldFactory.cs is no longer generated under FactoryClasses it seems.

Thanks,

Scott

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 07-Aug-2018 07:32:00   

Hi Scott,

Actually, it's documented in the Migrating your code section:

Documentation wrote:

Adapter: the EntityFieldFactory type has been removed as it's no longer used. The class FactoryClasses\EntityFieldFactory.cs/vb is by default removed from disk by the code generator. If you relied on this class in your own code for the two methods it provided, please enable the setting Project settings -> Conventions -> Entity Model -> LLBLGen Pro Runtime Framework -> Generate entity field factory. When this setting is enabled, the existing class is kept on disk and re-generated with each code generation cycle. It's not needed / used by the runtime framework anymore.

Also, in Available output settings values:

Documentation wrote:

Generated code, Adapter, backwards compatibility GenerateEntityFieldFactory When set to true (default is false), the code generator will for Adapter generate an **EntityFieldFactory **class. Set this setting to true if you need the functionality of EntityFieldFactory. It's not generated by default. If set to false, an existing EntityFieldFactory class will be removed from the output folder.

David Elizondo | LLBLGen Support Team
yowl
User
Posts: 266
Joined: 11-Feb-2008
# Posted on: 07-Aug-2018 14:47:35   

Thanks, I humbly apologise for not RTFMing. flushed