// GET: Talks/Details/5 public ActionResult Details(int id) { Talks talk = talkService.GetTalkById(id); TalksViewModel model = new TalksViewModel(); model.InjectFrom(talk); return(View(talk)); }
public IActionResult Edit(int?id) { TalkDto model = new TalkDto(); if (id.HasValue) { var existingTalk = service.GetTalkById(id.Value); if (existingTalk != null) { model = mapper.Map <TalkDto>(existingTalk); } } return(View(model)); }
public async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "Talk/{id}")] HttpRequest req, int id, ILogger log) { log.LogInformation($"Get Talk id {id}"); var talk = await _talkService.GetTalkById(id); if (talk == null) { return(new NotFoundResult()); } return(new OkObjectResult(talk)); }
public IActionResult GetTalk(int id) { return(Ok(talkServices.GetTalkById(id))); }