public IHttpActionResult GetFaqs() { var faqs = faqService.GetFaqs(); if (faqs != null) { return(Ok(faqs)); } return(NotFound()); }
private void setInitialModel(LoginModel model) { model.AllLanguages = _userManagerService.GetLanguages().OrderBy(o => o.IdLanguage).ToList(); string lang = (string)Request.RequestContext.RouteData.Values["lang"]; if (lang != null) { foreach (var lingua in model.AllLanguages) { if (lingua.InitialsLanguage == lang) { model.ActualLanguage = lingua; break; } } } else { model.ActualLanguage = model.AllLanguages.FirstOrDefault(); } model.Faqs = _faqService.GetFaqs(); }
public async Task <FaqViewModel> GetAllFaqs(int pageIndex) { Faqs = await _faqService.GetFaqs(pageIndex, 100000); return(this); }