When trying to match method and property names with your underlying data-store, Simple.Data will strip out all non-alphanumeric characters and try a case-insensitive match on what's left. There are times when this might not be ideal, such as having tables or columns with similar names:
IsGenerated Is_Generated
With the non-alphanumeric characters removed, this leads to duplicate columns names: isgenerated.
To work around these scenarios, you simply need to override the regular express that Simple.Data uses to remove non-alphanumeric characters to include the characters which distinguish your columns from being duplicates. In the example above, we need to tell Simple.Data to include the underscore character to avoid the naming conflicts with a one-time call to a static method:
Simple.Data.Extensions.HomogenizeEx.SetRegularExpression(new Regex("[^a-z0-9_]"));Now that we've told Simple.Data to include the underscore character, it now separates the distinct names correctly: isgenerated andis_generated.
The default regular expression that Simple.Data uses to find valid characters in names is new Regex("[^a-z0-9]").