示例#1
0
        public ActionResult Index()
        {
            IEnumerable <UserTrackDTO> userTrackDtos = userTrackService.GetUserTracks();
            var userTracks = Mapper.Map <IEnumerable <UserTrackDTO>, List <UserTrackViewModel> >(userTrackDtos);

            return(View(userTracks));
        }
示例#2
0
        public ActionResult Create()
        {
            ViewBag.TaskId  = new SelectList(taskService.GetTasks(), "TaskId", "Name");
            ViewBag.UserId  = new SelectList(userTrackService.GetUserTracks(), "UserId", "TaskName");
            ViewBag.StateId = new SelectList(taskStateService.GetTaskStates(), "StateId", "StateName");

            return(View("Create"));
        }