public void SaveFriendStatus(long userId1, long userId2, UserRelationStatus status)
 {
     using (var connection = new SqlConnection(_connectionString))
         using (var cmd = connection.CreateCommand())
         {
             connection.Open();
             cmd.CommandType = System.Data.CommandType.StoredProcedure;
             cmd.CommandText = GetUsersFriendsCmd;
             cmd.Parameters.AddWithValue("@userId1", userId1);
             cmd.Parameters.AddWithValue("@userId2", userId2);
             cmd.Parameters.AddWithValue("@status", (int)status);
             cmd.ExecuteNonQuery();
         }
 }
Пример #2
0
 public void SaveFriendStatus(long userId1, long userId2, UserRelationStatus status)
 {
     _friendsDataProvider.SaveFriendStatus(userId1, userId2, status);
 }