예제 #1
0
        public IActionResult Category()
        {
            if (HttpContext.Session.GetString("Name") == null)
            {
                return(RedirectToAction("Login", "Admin"));
            }
            GalleryViewModel mymodel = new GalleryViewModel();

            mymodel.PhotoCategories = photoCategoryService.GetAll().Data;
            mymodel.PhotoGalleries  = photoGalleryService.GetAll().Data;

            return(View(mymodel));
        }
        public IActionResult Get()
        {
            var photoGalleries = service.GetAll().Data;

            return(Ok(photoGalleries));
        }