Example #1
0
        public ActionResult Create()
        {
            var model = new PostFormViewModel()
            {
                PublishDate = DateTime.Now
            };

            ViewBag.AutorList = Mapper.Map <IEnumerable <AdmUserDto>, IList <AdmUserListViewModel> >(ServiceAdmUser.GetList());
            return(View(model));
        }
Example #2
0
        // GET: Admin/AdmUser
        public ActionResult Index()
        {
            IEnumerable <AdmUserDto> list = ServiceAdmUser.GetList();

            return(View("Index", Mapper.Map <IEnumerable <AdmUserDto>, IList <AdmUserListViewModel> >(list)));
        }