I am using LinqToSql as you've seen on subject.
I've a table and some colums in it. There is one colum to show the state of record.
0 : Not approved yet
1 : Approved
2 : Deleted
When the record inserted at first, its value is 0 (default value). When user approved it its value is changing to 1 but i'm getting this error:
Value of member 'state' of an object of type 'News' changed.
A member that is computed or generated by the database cannot be changed.
This is the test code:
DataClassesDataContext dc = new DataClassesDataContext();
var b = dc.GetTable<Ekler>().Where(p => p.ek_id == 1).FirstOrDefault();
if (b!=null)
{
b.state= "1";
dc.SubmitChanges();
}
What should i do to pass this problem?