The QuickFix Message object is not just a DTO, which makes them unsuitable for matching with a database using any ORM. QuickFix defines a different class derived from IFIL for each type of FIX field. This means that you will need to map the IField interface to the database and each individual field type.
To make matters worse, QuickFix / N is a port from Java with many Javaisms, which makes mapping very difficult, for example. using getter / setter methods instead of properties. An additional obstacle is having a separate namespace for each version of FIX, which means that you will need to display 4-5 different namespaces with slightly the same classes if you want to keep messages for all versions of FIX.
It’s best to create separate DTO objects that you can map to the database and convert from the object QuickFix messages to your DTOs. Fortunately, QuickFix includes data dictionaries for various versions of FIX in XML form, which you can use to generate your DTOs using a code generator.
To simplify the conversion, you can use a convention-based tool such as AutoMapper to convert QuickFix objects to your DTO without writing the conversion code itself.
Panagiotis kanavos
source share