partial void UpdateMusic(Music instance);
partial void DeleteMusic(Music instance);
partial void InsertMusic(Music instance);
public ActionResult ModMusic(int mid,Music music) { try { TianLaiDBDataContext db = new TianLaiDBDataContext(); music = db.Music.SingleOrDefault(p => p.Mid == mid); UpdateModel(music); db.SubmitChanges(); return Content("<label style='color:#35006A'>操作成功!</label>"); } catch (Exception ex) { ex.ToString(); return Content("<label style='color:Red'>操作失败!</label>"); } }