You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. Class
[Document(StorageType = StorageType.Json, Prefixes = new[] { "CustomerAssociation" })]
public class CustomerAssociation
{
[RedisIdField]
public long Id { get; set; }
[Indexed] public long StoreId { get; set; }
[Indexed] public long CustomerId { get; set; }
... Index Creation
public class IndexCreationService : IHostedService
{
private readonly RedisConnectionProvider _provider;
public IndexCreationService(RedisConnectionProvider provider)
{
_provider = provider;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
await _provider.Connection.CreateIndexAsync(typeof(CustomerAssociation));
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
this class is added in startup and is being called when app starts
Please suggest what i am missing here
The text was updated successfully, but these errors were encountered:
please suggest.
screenshot from redis stack
c#code:
.. Get Call
return await _customerAssociation.Where(c => c.StoreId == storeId).ToListAsync();
.. Class
[Document(StorageType = StorageType.Json, Prefixes = new[] { "CustomerAssociation" })]
public class CustomerAssociation
{
[RedisIdField]
public long Id { get; set; }
... Index Creation
public class IndexCreationService : IHostedService
{
private readonly RedisConnectionProvider _provider;
public IndexCreationService(RedisConnectionProvider provider)
{
_provider = provider;
}
The text was updated successfully, but these errors were encountered: