示例#1
0
        public IEnumerable <NotificationDto> GetNewNotifications()
        {
            var userId = User.Identity.GetUserId();

            var notifications = _unitOfWork
                                .Notification.GetNewNotificationsFor(userId);


            var config = MappingProfile.GetMappingProfile();

            IMapper Mapper = config.CreateMapper();

            return(notifications.Select(Mapper.Map <Notification, NotificationDto>));
        }