01-14-2017, 02:42 AM
При попытке сменить пароль выдает ошибку
[SRC=csharp]
private void button3_Click(object sender, EventArgs e)
{
string _user = txtUsername.Text;
tbl_user _tbl = _dbObj.tbl_user.First(i => i.username == txtUsername.Text);
_tbl.password = txtPassword.Text;
_dbObj.SaveChanges();
MessageBox.Show("Update Successfully....");
}
[/SRC]
Цитата:The property 'password' is part of the object's key information and cannot be modified.
[SRC=csharp]
private void button3_Click(object sender, EventArgs e)
{
string _user = txtUsername.Text;
tbl_user _tbl = _dbObj.tbl_user.First(i => i.username == txtUsername.Text);
_tbl.password = txtPassword.Text;
_dbObj.SaveChanges();
MessageBox.Show("Update Successfully....");
}
[/SRC]