/// <summary> /// 更新录像 /// </summary> /// <param name="recording">录像</param> /// <returns>是否成功</returns> public static bool UpdateRecording(Recording recording) { try { using (var db = new RepositoyContext()) { var dst = db.Set <Recording>().FirstOrDefault(a => a.id == recording.id); if (dst == null) { return(false); } MethodUtils.CopyProperties(recording, ref dst); db.SaveChanges(); } return(true); } catch (Exception e) { Tracker.LogE(e); return(false); } }