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); }