Beispiel #1
0
        public IActionResult Create()
        {
            var postVM = new PostViewModel();

            ViewBag.CategoryList = postCategoryService.GetPostCategories();
            return(View(postVM));
        }
        public ActionResult Create()
        {
            var postCategoryVM = new PostCategoryViewModel();

            ViewBag.PostCategories = new SelectList(postCategoryService.GetPostCategories(), "Id", "Name");
            return(View(postCategoryVM));
        }
        public IActionResult SearchPostCategory(PostCategoriesSearchModel searchModel)
        {
            var res = _postCategoryService.GetPostCategories(searchModel);

            if (res != null)
            {
                return(OkBaseResponse(res));
            }
            return(ErrorBaseResponse(System.Net.HttpStatusCode.NoContent));
        }