예제 #1
0
        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));
        }
예제 #2
0
 public IFormFile GetImage(string fileName)
 {
     return(_imageWriter.GetImage(fileName));
 }