EF Code First (Oracle) Optimistic Concurrency
Posted: Wed 04 May 2011 18:12
By using the Devart CodeFirst article and the ASP.NET MVC Entity Framework tutorials (Namely the one on concurrency) I was able to quickly figure out how to get CodeFirst working with dotConnect.
First off, kudos on the awesome support. It works practically exactly like an out of the box sql server. Only needed a few obvious changes to point it at oracle.
However, I was interested in the Concurrency example that is used on the ASP.NET MVC entity framework tutorials. In those examples, they use a [Timestamp] attribute on byte[] property
Now, the timestamp attribute attempts to use a rowversion column when using Sql Server, however under Oracle you receive the following error.
Thanks in advance
First off, kudos on the awesome support. It works practically exactly like an out of the box sql server. Only needed a few obvious changes to point it at oracle.
However, I was interested in the Concurrency example that is used on the ASP.NET MVC entity framework tutorials. In those examples, they use a [Timestamp] attribute on byte[] property
Code: Select all
[Timestamp]
public byte[] Timestamp { get; set; }
I looked around the forums and found a few posts on Concurrency, but mainly dealing with Model-First or Database First and recommending that a auto incrementing trigger is added to the concurrency tracking column. Which seems all well and good, but that doesn't work as well with Code First. So, I'm wondering if there is another way to do this via Code First with dotConnect?System.Data.MetadataException: Schema specified is not valid. Errors: (21, 6) : error 0040: The Type rowversion is not qualified with a namespace or alias. Only PrimitiveTypes can be used without qualification.
Thanks in advance