Exemplo n.º 1
0
        public async Task <UserPostLike> GetCurrentUserPostLike(Guid userId, Guid postId)
        {
            if (postId == Guid.Empty)
            {
                throw new ArgumentNullException(nameof(postId));
            }
            if (userId == Guid.Empty)
            {
                throw new ArgumentNullException(nameof(userId));
            }

            return((UserPostLike)await _context.FindAsync(typeof(UserPostLike), userId, postId));
        }
Exemplo n.º 2
0
        public async Task <UserFollow> GetCurrentUserFollow(Guid followerId, Guid followingId)
        {
            if (followerId == Guid.Empty)
            {
                throw new ArgumentNullException(nameof(followerId));
            }
            if (followingId == Guid.Empty)
            {
                throw new ArgumentNullException(nameof(followingId));
            }

            return((UserFollow)await _context.FindAsync(typeof(UserFollow), followerId, followingId));
        }