public IActionResult Create() { ViewBag.CategoryList = galleryItemCategoryService.GetGalleryItemCategories(); ViewBag.GalleryList = new SelectList(galleryService.GetGalleries(), "Id", "Name"); var galleryItem = new GalleryItemViewModel(); return(View(galleryItem)); }
public ActionResult Index(int top = 6) { var modelData = GalleryService.GetGalleries(top); ViewBag.IsAdminUser = GalleryService.IsAdminUser(User); return(View("Index", modelData)); }
public IActionResult Index() { var result = _galleryService.GetGalleries(); if (result.Success) { return(View(result.Data.Where(x => x.IsActive == true).ToList())); } return(View()); }
public IActionResult ListGallery() { var result = _galleryService.GetGalleries(); if (result.Success) { return(View(result.Data)); } ViewData["GeneralError"] = Messages.GeneralError; return(View()); }
public IActionResult GetGalleries() { try { return(Ok(_galleryService.GetGalleries())); } catch (Exception ex) { _logger.LogError("Error", ex); return(BadRequest()); } }