コード例 #1
0
        /// <inheritdoc />
        public Task <bool> HasFriendRelationship(int characterIdOne, int characterIdTwo)
        {
            long directionalUniquenessValue = CharacterFriendRelationshipModel.ComputeDirectionalUniquenessIndex(characterIdOne, characterIdTwo);

            //A friend relation exists if there is a uniqueness entry.
            return(Context.CharacterFriendRequests
                   .AnyAsync(cfr => cfr.DirectionalUniqueness == directionalUniquenessValue));
        }
コード例 #2
0
 /// <inheritdoc />
 public Task UpdateAsync(int key, CharacterFriendRelationshipModel model)
 {
     return(GenericRepository.UpdateAsync(key, model));
 }
コード例 #3
0
 /// <inheritdoc />
 public Task <bool> TryCreateAsync(CharacterFriendRelationshipModel model)
 {
     return(GenericRepository.TryCreateAsync(model));
 }