I created a new column in an existing database, to allow me a RowVersion for concurrency operations:
alter table MyTable add ColumnName rowversion
In my class I added the following property
public byte[] ColumnName { get; set; }
In the one method that uses this class i get the error when using this property
Cannot implicitly convert type 'System.Data.Linq.Binary' to 'byte[]'
I overcome this by adding ToArray (myObj.ColumnName.ToArray())
to the property.
In my ASP .Net page I add a hidden control to a Repeater and assign the value as
RowHiddenField.Value = Convert.ToBase64String(myObj.ColumnName);
Now i am trying to compare this column with the object passed in
public bool RowModified(MyObject myObj)
objFound = GetAllObjects.First(o=> o.ID = myObj.ID);
If (objFound.ColumnName == myObj.ColumnName)
but the values are never the same?
After reading a few links in converting TimeStamp, i've attempted them but either they didnt work (could be i was confused and did something wrong) or it didnt apply to my scenario.
Appreciate any help on this.