BinaryStudio.TaskManager.Web.Controllers.EventsController.MarkAllUnreadNewsAsReaden C# (CSharp) Method

MarkAllUnreadNewsAsReaden() public method

public MarkAllUnreadNewsAsReaden ( ListEventViewModel eventsViewModels ) : System.Web.Mvc.ActionResult
eventsViewModels BinaryStudio.TaskManager.Web.Models.ListEventViewModel
return System.Web.Mvc.ActionResult
        public ActionResult MarkAllUnreadNewsAsReaden(ListEventViewModel eventsViewModels)
        {
            var user = userProcessor.GetUserByName(User.Identity.Name);
            newsRepository.MarkAllUnreadNewsForUser(user.Id);
            eventsViewModels.Events = eventsViewModels.Events.Select(x =>
            {
                x.ContainerClassName = "container evnt_read";
                return x;
            }).ToList();
            this.notifier.SetCountOfNews(user.UserName);
            return Json(eventsViewModels);
        }