mikependon / RepoDB

A hybrid ORM library for .NET.
Apache License 2.0
1.7k stars 125 forks source link

Enhancement: Introduce the initialization within the library using an ApplicationConfigOptions class #1087

Closed mikependon closed 2 years ago

mikependon commented 2 years ago

Describe the enhancement

Add a possibility to pass the desired setup values to the application. With this capability, it would enable the user to set the behavior of the library in generalized context.

See below the sample desired code.

RepoDb.ApplicationConfiguration.Setup(new ApplicationConfigurationOptions
{
     ConversionType = ConversionType.Automatic,
     DefaultBatchOperationSize = 30,
     EnumDefaultDatabaseType = EnumDefaultDatabaseType.String,
     PushOperationReturnValue = PushOperationReturnValue.IdentityPrimary,
     ...
});

This method is recommended to only be called during the startup.

mikependon commented 2 years ago

The fixes to this will be available on the next version > RepoDB v1.12.10.