public void LikeDocument(string name, FeedItem document) { UserInterestRepository uiRep = new UserInterestRepository(); UserInterest interest = uiRep.Get(name); LikeDocument(interest, document); }
public void LikeDocument(UserInterest interest, FeedItem document) { UserInterestRepository uiRep = new UserInterestRepository(); interest.AddDocument(document); uiRep.Update(interest); }
public UserInterest AddUser(string name) { UserInterestRepository uiRep = new UserInterestRepository(); UserInterest interest = new UserInterest { Id = name }; uiRep.Add(interest); return(interest); }
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); }
public UsersInterestsController() { _userInterestRepository = new UserInterestRepository(); }
public void RemoveUser(string name) { UserInterestRepository uiRep = new UserInterestRepository(); uiRep.Remove(name); }
public void UpdateUser(UserInterest interest) { UserInterestRepository uiRep = new UserInterestRepository(); uiRep.Update(interest); }
public UserInterest GetUser(string name) { UserInterestRepository uiRep = new UserInterestRepository(); return(uiRep.Get(name)); }