Пример #1
0
        public ActionResult Update(int id)
        {
            Post         post  = _postRepository.GetById(id);
            UpdatePostVM model = new UpdatePostVM();

            model.PostDTO.Id          = post.Id;
            model.PostDTO.Header      = post.Header;
            model.PostDTO.Content     = post.Content;
            model.PostDTO.PublishDate = post.PublishDate;
            model.PostDTO.ImagePath   = post.ImagePath;

            List <Category> categories = _categoryRepository.GetActive();

            model.Categories = categories;

            List <AppUser> appUsers = _appUserRepository.GetActive();

            model.AppUsers = appUsers;

            return(View(model));
        }
Пример #2
0
        public ActionResult List()
        {
            List <AppUser> model = _appUserRepository.GetActive();

            return(View(model));
        }