Database specific features for IBM DB2

This section illustrates the database specific features for IBM DB2 which are available to you through configuration, either through the .config file of your application or through code.

See the Application configuration through .config files section for the details about the configuration settings defined through .config files.

See the RuntimeConfiguration system section for details about configuring the settings through code.

Temporal table support

For DB2, temporal tables are supported on DB2 10 or higher, for select / fetch queries using Linq or QuerySpec. Both Business Time and System Time predicates are supported. Below is an example using a linq query, where an entity is filtered using the System Time.

var q = metaData.Policy
                    .ForSystemTime("FROM {0} TO {1}", 
                                        new DateTime(2010, 1, 1), 
                                        new DateTime(2017, 1, 1))
                    .Where(p=>p.Vin == "A1111")