Exemplo n.º 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));
        }
Exemplo n.º 2
0
 /// <inheritdoc />
 public Task UpdateAsync(int key, CharacterFriendRelationshipModel model)
 {
     return(GenericRepository.UpdateAsync(key, model));
 }
Exemplo n.º 3
0
 /// <inheritdoc />
 public Task <bool> TryCreateAsync(CharacterFriendRelationshipModel model)
 {
     return(GenericRepository.TryCreateAsync(model));
 }