This is my code:
... Domain.Box updatedBox = entities.Boxes.FirstOrDefault(TextBoxBoxID.Text); updatedBox = getBoxInfo(); entities.SaveChanges(); private Domain.Box getBoxInfo() { Domain.Box retBox = new Domain.Box(); retBox.BoxID = TextBoxBoxID.Text; retBox.LocationID = Convert.ToDecimal(TextBoxLocationID.Text); retBox.Positions = Convert.ToByte(TextBoxPositions.Text); retBox.DiseaseID = RadComboBoxDisease.SelectedValue; retBox.SampleTypeID = RadComboBoxSampleType.SelectedValue; retBox.TubeTypeId = RadComboBoxTubeTypeID.SelectedValue; return retBox; } The code compiles and executes fine, but the database does not changes, this is, all the information is exactly the same as it was before the update. Any help will be appreciated, thanks!