コード例 #1
0
        public async Task <Visit> VisitSlide(string courseId, Guid slideId, string userId)
        {
            if (string.IsNullOrEmpty(userId))
            {
                return(null);
            }
            await visitsRepo.AddVisit(courseId, slideId, userId, GetRealClientIp());

            return(visitsRepo.FindVisit(courseId, slideId, userId));
        }
コード例 #2
0
        public async Task <Visit> VisitSlide(string courseId, string slideId)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(null);
            }
            var userId = User.Identity.GetUserId();
            await visitsRepo.AddVisit(courseId, slideId, userId);

            return(visitsRepo.GetVisiter(slideId, userId));
        }