Since the standard Entity Framework Model Designer does not allow for all SQL data types i wrote an extension for Visual Studio 11 Entity Framework Model Designer to add a custom annotation "SQLDataType". My extension to enter to property in the property
pane works fine. It includes the custom property into the CSDL e.g.: Rowversion automatically by database for optimistic locking purposes rowversion But the "Generate Database from Model" does still not copy it to SSDL. I tried it serveral times
with different properties. I also completly removed all SSDL from the .edmx file (in XML Editor Mode) just to make sure it is regenerated. I even did it with the standard DDL Generation Template "SSDLToSQL10.tt (VS)" and the standard Workflow, but
my custom property never shows up in SSDL, so that I could access it with my modified t4 template to generate the correct SQL create table statement. I use the Entity Framework 5 Version installed with Visual Studio 11 Beta.
lajones: We think there is a bug here. See OutputGeneratorHelpers lines 163 and 170. We look only for the CopyToSSDL attribute
with the V2 namespace
. We should look for it in either the V2 or V3 namespaces.
More discussion on this issue is available in the original Connect bug -