public void SaveUserInterest(UserInterest userInterest) { _userInterestRepository.SaveOrUpdate(userInterest); }
public virtual void RemoveInterest(UserInterest interest) { _interests.Remove(interest); UpdateLastActivity(); }
public void DeleteUserInterest(UserInterest userInterest) { _userInterestRepository.Delete(userInterest); }
public virtual UserInterest AddInterest(Interest interest, int? socialityPoints) { var existingUserInterest = _interests.FirstOrDefault(x => x.Interest == interest); if (existingUserInterest == null) { existingUserInterest = new UserInterest { User = this, Interest = interest, SocialityPoints = socialityPoints }; _interests.Add(existingUserInterest); } UpdateLastActivity(); return existingUserInterest; }