Ejemplo n.º 1
0
        public IActionResult Index()
        {
            IEnumerable <ListForumsModel> forums = _forumService.TakeAll().Select(x => new ListForumsModel
            {
                Id    = x.Id,
                Title = x.Title,
                Info  = x.Info
            }
                                                                                  );

            var model = new IndexForumModel
            {
                ForumsList = forums
            };

            return(View(model));
        }