partial void DeleteExamTestPicture(ExamTestPicture instance);
partial void UpdateExamTestPicture(ExamTestPicture instance);
private void detach_ExamTestPictures(ExamTestPicture entity) { this.SendPropertyChanging(); entity.ExamTestQuestion = null; }
partial void InsertExamTestPicture(ExamTestPicture instance);
private void UploadFiles(IEnumerable<HttpPostedFileBase> fileUpload, ExamTestQuestion question) { foreach (var file in fileUpload) { if (file == null) continue; var ms = new MemoryStream(); using (ms) { file.InputStream.CopyTo(ms); } var pictureBuffer = ms.GetBuffer(); var tPicture = new ExamTestPicture() { Picture = pictureBuffer, ExamTestQuestionID = question.ExamTestQuestionID }; question.ExamTestPictures.Add(tPicture); } }