Hi
This question concerns the Code First for EF6 in LLBLGenPro 4.2 and the handling of timestamp data types.
The ModelBuilder mapping class outputs this by default as the timestamp column is NOT NULL in the SQL Server 2012 database schema
config.Property(t => t.RowVersionStamp).IsRequired();
This results in a runtime error when trying to persist the entity to the database.
I changed the code to include the following (given below) and Entity Framework was able to identify the column as a timestamp column and I was able to save the data successfully to the database.
config.Property(t => t.RowVersionStamp).IsRequired();
config.Property(t => t.RowVersionStamp).IsRowVersion();
Is there a setting somewhere that controls this or is this something missing from the template that generates the model builder class.
I recall from EF V1 there was a project setting for EF concurrency but that does not appear to be in the later versions.
PS
Looking at the template for this it does check for a specific setting, but I don't see this in the Project Settings :
UseForOptimisticConcurrencyChecks