public async Task <OperationDetails> Delete(SubmissionDoc dto) { var found = await _submissionRepository.GetAsync(p => p.Id == dto.Id); if (found == null) { return(new OperationDetails(false, "Абітурієнт не знайдений", "")); } _submissionRepository.Delete(dto); await SaveSubmission(); return(new OperationDetails(true, "Документ абітурієнта видалений", "")); }
public async Task <OperationDetails> Create(SubmissionDoc dto) { var found = await _submissionRepository.GetAsync(p => p.FullName == dto.FullName); if (found != null) { return(new OperationDetails(false, "Такий абітурієнт вже є у базі", "")); } _submissionRepository.Add(dto); await SaveSubmission(); return(new OperationDetails(true, "Документ абітурієнта створений", "")); }
public bool SubmitModule(SubmissionCandidate candidate, string contactName, string contactEmail, List<string> feedback) { var submission = new SubmissionDoc { SubmissionSource = "Website", Contact = new Contact { Name = contactName, Email = contactEmail }, Candidate = candidate }; _storage.Store(submission); return true; }
public async Task <OperationDetails> Edit(SubmissionDoc dto) { throw new NotImplementedException(); }