Exemplo n.º 1
0
        public PartialViewResult CreateFeed(HomeViewModel model)
        {
            // get a user that matches the name of the currently logged in user
            User user = _userService.FindUserForName(User.Identity.Name);
            Feed feed = new Feed()
            {
                Name  = model.NewFeedName,
                Owner = user
            };

            model.Feeds = _twitterService.AddFeed(feed);
            _unit.Commit();

            model.NewFeedName = "";
            ModelState.Clear();
            return(PartialView("_FeedView", model));
        }