Example #1
0
        public async Task <EvacuationFileNotesQueryResponse> Handle(EvacuationFileNotesQuery query)
        {
            var file = (await caseRepository.QueryCase(new Resources.Cases.EvacuationFilesQuery
            {
                FileId = query.FileId,
            })).Items.Cast <Resources.Cases.EvacuationFile>().FirstOrDefault();

            if (file == null)
            {
                throw new Exception($"Evacuation File {query.FileId} not found");
            }

            var notes = file.Notes;

            if (!string.IsNullOrEmpty(query.NoteId))
            {
                notes = notes.Where(n => n.Id == query.NoteId).ToArray();
            }

            return(new EvacuationFileNotesQueryResponse {
                Notes = mapper.Map <IEnumerable <Shared.Contracts.Submissions.Note> >(notes)
            });
        }
Example #2
0
        public async Task <EvacuationFileNotesQueryResult> Handle(EvacuationFileNotesQuery query)
        {
            await Task.CompletedTask;

            throw new NotImplementedException();
        }