It is a best practice to use the appropriate data type in your .net entities and not be restrained to the type defined in the database schema. For example, in many legacy systems, the date field was defined with decimal or numeric 8 and stored in the format CCYYMMDD. In .net, all dates should use the DateTime data type.
The Accelerator allows you to convert you data between the data type defined in the entities and the data type defined in your schema. By default, the datamaps assume that the database type is the same as the entity type. If they are not, you need to specify the database type. The accelerator has some builtin data type conversions which should cover most of your database conversion needs. We also have the ability fo you to develop your own custom conversion programs.
In this example, our database has a datatype of DATE and NUMERIC(8) which both store dates.
In the .net Entity, all 3 fields are defined using the DateTime? data type. (ex:)
In order to map these 3 fields to and from the entity, I need to specify on the map the "dataBaseFieldType".
You can specify it like this:
In you have custom conversion needs, you can specify your own convert to and convert from methods.