Beispiel #1
0
        public void LogAnonymousVisit(Guid userID)
        {
            var visit = _visitRepository
                .Find(x => x.VisitingUserId == null && x.UserId == userID)
                .FirstOrDefault();
            if (visit == null)
            {
                visit = new Visit();
                _visitRepository.Add(visit);
            }
            visit.VisitingUserId = null;
            visit.UserId = userID;

            visit.Created = DateTime.Now;
            //_repository.Save();
        }
Beispiel #2
0
        public void LogMemberVisit(Guid visitingUserID, Guid userID)
        {
            if (visitingUserID == userID)
                return;

            var visit = _visitRepository
                .FindAll()
                .FirstOrDefault(x => x.VisitingUserId == visitingUserID && x.UserId == userID);

            if (visit == null) // first time
            {
                visit = new Visit { UserId = userID, VisitingUserId = visitingUserID };
                _visitRepository.Add(visit);
            }

            visit.Created = DateTime.Now;
            //_repository.Save();
        }
 public void Delete(Visit entity)
 {
     throw new NotImplementedException();
 }