public ActionResult Details(int?id)
        {
            TaskDetailsVm model = new TaskDetailsVm();

            model.PagerComment      = model.PagerComment ?? new Pager();
            model.PagerLogWork      = model.PagerLogWork ?? new Pager();
            model.FilterComment     = model.FilterComment ?? new CommentsFilter();
            model.FilterLoggedWorks = model.FilterLoggedWorks ?? new LoggedWorksFilter();
            TryUpdateModel(model);

            TaskRepo repository = RepositoryFactory.GetTasksRepository();
            Task     task       = repository.GetById(Convert.ToInt32(id));

            model.Id              = task.Id;
            model.UserId          = task.UserId;
            model.Title           = task.Title;
            model.Description     = task.Description;
            model.ResponsibleUser = task.ResponsibleUser;
            model.Creator         = task.Creator;
            model.Status          = task.Status;
            model.LastChange      = task.LastChange;
            model.CreateTime      = task.CreateTime;

            CommentRepo    comRepo     = RepositoryFactory.GetCommentsRepository();
            LoggedWorkRepo logWorkRepo = RepositoryFactory.GetLoggedWorksRepository();

            string action     = this.ControllerContext.RouteData.Values["action"].ToString();
            string controller = this.ControllerContext.RouteData.Values["controller"].ToString();

            //comments
            model.FilterComment.Prefix = "FilterComment.";
            string commentsPrefix = "PagerComment.";

            model.FilterComment.TaskId = task.Id;
            int commentsResultCount = comRepo.Count(model.FilterComment.BuildFilter());

            model.PagerComment = new Pager(commentsResultCount, model.PagerComment.CurrentPage, model.PagerComment.PageSize, commentsPrefix, action, controller);
            model.FilterComment.ParentPager = model.PagerComment;
            model.CommentsList = comRepo.GetAll(model.FilterComment.BuildFilter(), model.PagerComment.CurrentPage, model.PagerComment.PageSize.Value).ToList();

            //loggedwork
            model.FilterLoggedWorks.Prefix = "FilterLoggedWorks.";
            string loggedWorkPrefix = "PagerLogWork.";

            model.FilterLoggedWorks.TaskId = task.Id;
            int loggedWorkResultCount = logWorkRepo.Count(model.FilterLoggedWorks.BuildFilter());

            model.PagerLogWork = new Pager(loggedWorkResultCount, model.PagerLogWork.CurrentPage, model.PagerLogWork.PageSize, loggedWorkPrefix, action, controller);
            model.FilterLoggedWorks.ParentPager = model.PagerLogWork;
            model.LoggedWorkList = logWorkRepo.GetAll(model.FilterLoggedWorks.BuildFilter(), model.PagerLogWork.CurrentPage, model.PagerLogWork.PageSize.Value).ToList();

            return(View(model));
        }