public void DelExamEV() { Exam exam = new Exam(); if (CurrentExamEV == null) { exam.Save(); ErrorsListEV = exam.CurrentValidation.Errors.Select(x => new ErrorMessage() { Message = x }).ToList(); } else { ErrorsListEV = new List <ErrorMessage>(); exam = CurrentExamEV; exam.Delete(); GetExamsEV(); TitleEVM = ""; TextEVM = ""; DateEVM = DateTime.Now; } }
public void DelExamEV() //Meu : Funciona OK !! { Exam exam = new Exam(); exam = CurrentExamEV; exam.Delete(); ErrorsListEV = exam.CurrentValidation.Errors.Select(x => new ErrorMessage() { Message = x }).ToList(); GetExamsEV(); TitleEVM = ""; TextEVM = ""; DateEVM = DateTime.Now; }