public VideoInspectionViewModel(VideoInspection model)
        {
            Model = model;

            if (model.Key == Guid.Empty)
                model.Key = Guid.NewGuid();

            base.RegisterCommand(AddVideosCommand, param => true, param => AddVideos());
            base.RegisterCommand(CommitCommand, param => true, param => Commit());

            db = new ForensicToolkitDBDataContext();
            model.Case = db.Cases.Single();
            db.VideoInspections.InsertOnSubmit(model);
            videos = new ObservableCollection<VideoViewModel>();
            this.Videos = new ReadOnlyObservableCollection<VideoViewModel>(videos);
        }
 partial void DeleteVideoInspection(VideoInspection instance);
 partial void UpdateVideoInspection(VideoInspection instance);
 partial void InsertVideoInspection(VideoInspection instance);
		private void detach_VideoInspections(VideoInspection entity)
		{
			this.SendPropertyChanging();
			entity.Case = null;
		}