Say you developed your application using CodeFluent Entities and shipped several versions of your application: how can you know from the code in production which model version was used to generate it?
First, in SQL a cf_modelVersion function is generated which allows you to retrieve a “model version number” indicating the model version used to generate the current SQL.
Likewise, in the generated Business Object Model (BOM), you’ll find something like this:
[assembly: CodeFluent.Runtime.Utilities.CodeFluentGeneratedAttribute("1.0.50204.0578", "CodeFluent Entities generated (http://www.softfluent.com). Date: Wednesday, 23 February 2011 22:20.", CodeFluent.Runtime.Utilities.CodeFluentGeneratedAttributeOptions.CompiledWithCodeFluent, 1431726511u)]
As you can see it also contains the same model version number: starting from the code, you can know which model version was used to generate them, and in addition, you can check that the BOM and SQL are consistent.
In fact, the CodeFluent Runtime even provides a method to do so programmatically: