Beispiel #1
0
        public void LikeDocument(string name, FeedItem document)
        {
            UserInterestRepository uiRep    = new UserInterestRepository();
            UserInterest           interest = uiRep.Get(name);

            LikeDocument(interest, document);
        }
Beispiel #2
0
        public void LikeDocument(UserInterest interest, FeedItem document)
        {
            UserInterestRepository uiRep = new UserInterestRepository();

            interest.AddDocument(document);
            uiRep.Update(interest);
        }
Beispiel #3
0
        public UserInterest AddUser(string name)
        {
            UserInterestRepository uiRep    = new UserInterestRepository();
            UserInterest           interest = new UserInterest
            {
                Id = name
            };

            uiRep.Add(interest);

            return(interest);
        }
Beispiel #4
0
        public UserInterest GetOrAddUser(string name)
        {
            UserInterestRepository uiRep    = new UserInterestRepository();
            UserInterest           interest = uiRep.Get(name);

            if (interest == null)
            {
                interest = new UserInterest
                {
                    Id = name
                };
                uiRep.Add(interest);
            }
            return(interest);
        }
Beispiel #5
0
 public UsersInterestsController()
 {
     _userInterestRepository = new UserInterestRepository();
 }
Beispiel #6
0
        public void RemoveUser(string name)
        {
            UserInterestRepository uiRep = new UserInterestRepository();

            uiRep.Remove(name);
        }
Beispiel #7
0
        public void UpdateUser(UserInterest interest)
        {
            UserInterestRepository uiRep = new UserInterestRepository();

            uiRep.Update(interest);
        }
Beispiel #8
0
        public UserInterest GetUser(string name)
        {
            UserInterestRepository uiRep = new UserInterestRepository();

            return(uiRep.Get(name));
        }