Skip to content

Commit

Permalink
Fix ChatsDbContext visibility to be internal again
Browse files Browse the repository at this point in the history
  • Loading branch information
cvetomir-todorov committed Jun 7, 2024
1 parent b8ff7ac commit 656be42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/CecoChat.Chats.Data/ChatsDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ void PrepareUdt<TUserDefinedType>(string keyspace, string typeName)
where TUserDefinedType : new();
}

public sealed class ChatsDbContext : CassandraDbContext, IChatsDbContext
internal sealed class ChatsDbContext : CassandraDbContext, IChatsDbContext
{
private readonly ILogger _logger;

public ChatsDbContext(
ILogger<ChatsDbContext> logger,
IOptions<CassandraOptions<ChatsDbContext>> options) : base(logger, options)
IOptions<CassandraOptions<IChatsDbContext>> options) : base(logger, options)
{
_logger = logger;
}
Expand Down
2 changes: 1 addition & 1 deletion source/CecoChat.Chats.Testing/ChatsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ChatsService(string environment, int listenPort, string certificatePath,
EnvironmentName = environment
});
builder.Configuration.AddJsonFile(configFilePath, optional: false);
builder.Services.Configure<CassandraOptions<ChatsDbContext>>(cassandra =>
builder.Services.Configure<CassandraOptions<IChatsDbContext>>(cassandra =>
{
cassandra.ContactPoints = [$"{chatsDb.Host}:{chatsDb.Port}"];
});
Expand Down
2 changes: 1 addition & 1 deletion source/Common.Cassandra/CassandraAutofacModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ protected override void Load(ContainerBuilder builder)
.As<TDbContext>()
.Named<ICassandraDbContext>(_dbContextName)
.SingleInstance();
builder.RegisterOptions<CassandraOptions<TDbContextImplementation>>(_cassandraConfiguration);
builder.RegisterOptions<CassandraOptions<TDbContext>>(_cassandraConfiguration);
}
}

0 comments on commit 656be42

Please sign in to comment.