public IHttpActionResult FollowArtist(FollowDto followDto) { if (_unitOfWork.Followings.GetFollower(followDto.ArtistId, User.Identity.GetUserId()) != null) { return(BadRequest("You are following this artist already")); } var followArtist = new ArtistFollower() { ArtistId = followDto.ArtistId, FollowerId = User.Identity.GetUserId() }; _unitOfWork.Followings.Add(followArtist); _unitOfWork.Complete(); return(Ok()); }
public void Remove(ArtistFollower artistFollower) { _context.ArtistFollowers.Remove(artistFollower); }
public void Add(ArtistFollower artistFollower) { _context.ArtistFollowers.Add(artistFollower); }