dotConnect for Oracle has some options that customize translating LINQ to Entities to SQL statements. The list of these options includes:
OrderByNullBehavior. Determines how NULL values will participate in sorting (whether to add NULLS FIRST or NULLS LAST to the ORDER BY clause of generated SQL queries). This option can have the following values:
Default. In this case neither NULLS FIRST nor NULLS LAST is added to the generated ORDER BY clauses.
NullsFirst . In this case NULLS FIRST is added to the generated ORDER BY clauses.
TrueValueNumber - Allows you to specify which number values are accepted as a true boolean value:
One. Only value of 1 is accepted as as a true boolean value.
NotZero . Any non-zero number is accepted as a true boolean value. This is the default value.
Please note that the last two options work with both common DefaultValue SSDL attribute and the new custom devart:DefaultValue SSDL attribute. The latter attribute does not trigger the type consistency check, so you can use a wider range of default values, like CURRENT_TIMESTAMP or my_sequence.nextval.
Here is a simple example:
<Property Name="ProductID" Type="int" Nullable="false" devart:DefaultValue="my_sequence.NEXTVAL" StoreGeneratedPattern="Identity" />
The generated SQL command looks like the following:
INSERT INTO "Product" ("ProductID","ProductName","UnitScale","InStock","Price","DiscontinuedPrice") VALUES(my_sequence.NEXTVAL,:p0,:p1,:p2,:p3,:p4)
These options can be set either in code as the properties of the EntityProviderConfig.QueryOptions object or in the project config file as the attributes of the QueryOptions element of the Devart.Data.Oracle.Entity tag.