public static bool Edit(Speaker speaker, ModelStateDictionary msd) { if (msd.IsValid) { using (var ctx = new ConferenceContext()) { ctx.Entry(speaker).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); return true; } } return false; }