C # When writing the table structure, you must add autosync = autosync In column () of the primary key ID. oninsert, dbtype = "int not null identity", canbenull = false, isdbgenerated = true, isprimarykey = true
[Column]
Public double latitude
{
Get {return _ latitude ;}
Set
{
If (_ latitude! = Value)
{
Notifypropertychanging ("latitude ");
_ Latitude = value;
Notifypropertychanged ("latitude ");
}
}
}
Public event propertychangedeventhandler propertychanged;
Private void policypropertychanged (string propertyname)
{
If (propertychanged! = NULL)
{
Propertychanged (this, new propertychangedeventargs (propertyname ));
}
}
Public event propertychangingeventhandler propertychanging;
Private void policypropertychanging (string propertyname)
{
If (propertychanging! = NULL)
{
Propertychanging (this, new propertychangingeventargs (propertyname ));
}
}
This type of information cannot be left empty. Otherwise, submitchanges does not work.