Пример #1
0
        public async Task <bool> DeleteDocumentAsync <TEntity>(TEntity entity, bool deleteFromDatabase = true)
            where TEntity : RedisearchSerializable <TEntity>, new()
        {
            var database      = _redisConnection.GetDatabase();
            var deleteCommand = DeleteCommand.Create(entity, deleteFromDatabase);

            return(await deleteCommand.ExecuteAsync(database).ConfigureAwait(false));
        }
Пример #2
0
        public bool DeleteDocument <TEntity>(TEntity entity, bool deleteFromDatabase = true)
            where TEntity : RedisearchSerializable <TEntity>, new()
        {
            var database      = _redisConnection.GetDatabase();
            var deleteCommand = DeleteCommand.Create(entity, deleteFromDatabase);

            return(deleteCommand.Execute(database));
        }