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

GetInvitationsAndNewsCount() private method

private GetInvitationsAndNewsCount ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
        public ActionResult GetInvitationsAndNewsCount()
        {
            int[] countArray = new int[2];
            int userId = userProcessor.GetUserByName(User.Identity.Name).Id;
            int newsCount = newsRepository.GetNewsCount(userId);
            int invitesCount = projectProcessor.GetAllInvitationsToUser(userId).Count();
            countArray[0] = newsCount;
            countArray[1] = invitesCount;
            return Json(countArray);
        }