public async Task <ActionResult <IndividualModel> > Get(int id) { var result = await _repository.GetIndividualAsync(id); if (result == null) { return(NotFound(_localizer["Individual could not be found"])); } var model = _mapper.Map <IndividualModel>(result); if (!string.IsNullOrEmpty(result.Image)) { model.Image = _imageWriter.GetImage(result.Image); } return(Ok(model)); }
public IFormFile GetImage(string fileName) { return(_imageWriter.GetImage(fileName)); }