public IActionResult Get(string id) { var picture = pictureService.Get(id); if (picture == null) { return(NotFound()); } return(Ok(picture)); }
public async Task <IActionResult> Index() { ViewBag.Current = "Bio"; var picture = await _pictureService.Get(-1); // Random var tags = await _tagService.GetAll(); var vm = new BioViewModel { AllTags = tags.Select(s => s.TagName).ToList(), BioPictureViewModel = _mapper.Map <BioPictureViewModel>(picture) }; return(View(vm)); }
public async Task <IActionResult> Get(int id) { var pictureResponse = await _pictureService.Get(id); return(Ok(pictureResponse)); }