public async Task <UserPostSave> UserSavePost(Guid userId, Guid postId) { if (postId == Guid.Empty) { throw new ArgumentNullException(nameof(postId)); } if (userId == Guid.Empty) { throw new ArgumentNullException(nameof(userId)); } var userPostSave = new UserPostSave { PostId = postId, UserId = userId, }; await _context.AddRangeAsync(userPostSave).ConfigureAwait(false); return(userPostSave); }
public void UserUnlikeAPost(UserPostSave currentUserPostSave) { _context.Remove(currentUserPostSave); }