Example #1
0
        public IHttpActionResult GetFaqById(int Id)
        {
            var faq = faqService.GetFaq(Id);

            if (faq != null)
            {
                return(Ok(faq));
            }
            return(NotFound());
        }
        public ActionResult Upsert(Guid?id = null)
        {
            var model = new FaqUpsertViewModel();

            if (id.HasValue)
            {
                using (ContextManager.NewConnection())
                {
                    model = Mapper.Map <FaqUpsertViewModel>(faqService.GetFaq(id.Value, true));
                }
            }

            InitUpsertBreadcrumb(model);
            return(View(model));
        }