public async Task <bool> AddDocumentAsync <TEntity>(TEntity entity, double score = 1.0d, string language = null) where TEntity : RedisearchSerializable <TEntity>, new() { var database = _redisConnection.GetDatabase(); var addCommand = AddCommand.Create(_serializer, entity, score, language); return(await addCommand.ExecuteAsync(database).ConfigureAwait(false)); }
public bool AddDocument <TEntity>(TEntity entity, double score = 1.0d, string language = null) where TEntity : RedisearchSerializable <TEntity>, new() { var database = _redisConnection.GetDatabase(); var addCommand = AddCommand.Create(_serializer, entity, score, language); return(addCommand.Execute(database)); }