Пример #1
0
        public async Task <PersonNotificationsModel> GetPersonNotifications(Guid uid)
        {
            var model = new PersonNotificationsModel();

            model.NewEventInvitationsCount = (await _eventRepository.GetPersonInvitations(uid)).Count;
            model.NewFriendsCount          = (await _personRepository.GetNewFriends(uid)).Count;
            model.AnyNewChatMessages       = await _chatRepository.CheckPersonForNewChatMessages(uid);

            model.AnyNewBadges = await _badgeRepository.AnyPersonUnviewedBadges(uid);

            return(model);
        }