Пример #1
0
        //TODO in DAL layer implement Data integrity constraints (using attributes)
        //TODO probably, I'd better get some instances by name (login for User, name for Thread etc) rather than Id to provide good links

        public async Task <ActionResult> Thread(int id)
        {
            ThreadDto threadDto = await Task.Run(() => _serviceFacade.ThreadService.Get.ById(id));

            if (threadDto == null)
            {
                return(HttpNotFound("Такого треда не существует"));
            }

            return(View(threadDto.MapToVm()));
        }
Пример #2
0
        // GET: Thread
        public async Task <ActionResult> Index(int id)
        {
            ThreadDto threadDto = await Task.Run(() => _serviceFacade.ThreadService.Get.ById(id));

            return(View(threadDto.MapToVm()));
        }