Esempio n. 1
0
        public async Task <IActionResult> Tip(string id)
        {
            rest_api.Models.Tip tip = await TipViewManager.GetTipById(id);

            TipViewModel viewModel = new TipViewModel(tip);

            return(View(viewModel));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        public async Task <IActionResult> Index()
        {
            rest_api.Models.Tip[] tips = await TipViewManager.GetRandomTips(10);

            IndexViewModel viewModel = new IndexViewModel(tips);

            return(View(viewModel));
        }