I have the following table definition in MSSQL:
CREATE TABLE [User] (
[Id] bigint identity(1,1) NOT NULL,
[Email] nvarchar(256),
[PasswordHash] nvarchar(128) NOT NULL,
[PasswordFormat] int DEFAULT ((0)) NOT NULL,
[PasswordSalt] nvarchar(10) NOT NULL,
[Timestamp] timestamp
)
;
The EDMX property for Timestamp is as follows: (Note that only the red property has changed by me manually)
alt text http://i35.tinypic.com/2ez7g9k.png
I used the t4 template to automatically create POCO objects. The custom object is as follows:
public partial class User : IEntity
{
public virtual long Id
{
get;
set;
}
...
[TimestampAttribute]
[ConcurrencyCheck]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Autogenerated by T4.")]
public virtual byte[] Timestamp
{
get;
set;
}
...
}
When I perform the SaveChanges operation in the ObjectContext, I get a validation error for the User object that is being called: Timestamp field
source
share