Search code examples
codefluent

How to register custom FileSystemBinaryLargeObject


How to configure codefluent runtime in odrder to plug in a custom class which inherits from FileSystemBinaryLargeObject ?

In our use case we have an entity with more than 100k files. I need to figure out how to chunk them in subdirectories..

Thanks


Solution

  • For all entities:

    <configuration>
     <configSections>
       <section name="MyDefaultNamespace" type="CodeFluent.Runtime.CodeFluentConfigurationSectionHandler, CodeFluent.Runtime" />
     </configSections>
     <MyDefaultNamespace ... other attributes ...
      binaryServicesTypeName="CustomBinaryServices, Assembly"
      binaryServicesEntityConfigurationTypeName="CustomBinaryServicesConfiguration, Assembly"
      />
    </configuration>
    

    For a specific entity:

    <configuration>
     <configSections>
       <section name="MyDefaultNamespace" type="CodeFluent.Runtime.CodeFluentConfigurationSectionHandler, CodeFluent.Runtime" />
     </configSections>
     <MyDefaultNamespace ... other attributes ... >
       <binaryServices entityFullTypeName="MyDefaultNamespace.MyNamespace.MyEntity"
         binaryServicesTypeName="CustomBinaryServices, Assembly" 
         binaryServicesEntityConfigurationTypeName="CustomBinaryServicesConfiguration, Assembly"/>
     </MyDefaultNamespace>
    </configuration>