public async Task <IActionResult> Tip(string id) { rest_api.Models.Tip tip = await TipViewManager.GetTipById(id); TipViewModel viewModel = new TipViewModel(tip); return(View(viewModel)); }
public async Task <IActionResult> Search(string term) { rest_api.Models.Tip[] tips = await TipViewManager.GetSearchTips(term); SearchViewModel viewModel = new SearchViewModel(tips, term); return(View(viewModel)); }
public async Task <IActionResult> Tag(string tag) { rest_api.Models.Tip[] tips = await TipViewManager.GetTipsByTag(tag); TagViewModel viewModel = new TagViewModel(tips, tag); return(View(viewModel)); }
public async Task <IActionResult> Index() { rest_api.Models.Tip[] tips = await TipViewManager.GetRandomTips(10); IndexViewModel viewModel = new IndexViewModel(tips); return(View(viewModel)); }