public void RemoveFollower(FollowBLL followBll) { if (followBll == null) { throw new ArgumentNullException("Object cannot be null"); } var subcribe = _db.Followers.Find(p => p.Id == followBll.Id).Single(); _db.Followers.Remove(subcribe); _db.Save(); }
public void AddFollower(FollowBLL followBll) { if (followBll == null) { throw new ArgumentNullException("Object cannot be null"); } _db.Followers.Add(new Follow() { Id = Guid.NewGuid().ToString(), Follower = _db.UserRepository.Find(p => p.Id == followBll.FollowerId).Single(), User = _db.UserRepository.Find(p => p.Id == followBll.UserId).Single() }); _db.Save(); }