i have a STUDENT table object in which i have new values and i want to update the STUDENT table with these new values. my code is given bellow (which is working for copying properties from STD to getdata but) its not updating the values in STUDENT table in database why? thankyou in advance.
public void UpdateStudent(STUDENT STD)
{
context = new ERPDataContext();
var getdata = context.STUDENTs.SingleOrDefault(obj=>obj.ID==STD.ID);
getdata = STD;
context.SubmitChanges();
}