Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to use or pass the DefaultKeyspace during DbContext configuration? #16

Closed
Delta-38 opened this issue Nov 12, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@Delta-38
Copy link

Hi everyone, I'm using EFCore.Cassandra (and liking it so far) to manage initialization and migrations on a cassandra cluster, but, despite the fairly straightforward tutorial, I ran into a couple of hurdles.

The first is one of configuration, even though in the option.UseCassandra method one can set default keyspace and connection options most of the actual model configuration methods require explicitly setting the Keyspace.
For example Keyspace creation with the ForCassandraAddKeyspace, requires it explicitly and there doesn't seem to be an option to use the DefaultKeyspace provided to the UseCassandra method.

A similar occurrence happens with User Defined Types, where the schema / Keyspace has to be explicitly set.

This is an issue for me because the DbContext and the configuration are not in the same project, and I would rather not have to hardcode these settings.

Thanks in advance and I apologize if the functionality is there and I've simply missed it of course or if there's a quick workaround.

@simpleidserver simpleidserver self-assigned this Nov 12, 2020
@simpleidserver simpleidserver added the enhancement New feature or request label Nov 12, 2020
@simpleidserver simpleidserver added this to In Progress in 2.0.4 Nov 12, 2020
@simpleidserver
Copy link
Owner

Hi,

The default keyspace can be specified only one time. Please fetch the latest changes from the branch "release/2.0.4" and run the "EFCore.Cassandra.Samples" project. The default keyspace can be passed into the "UseCassandra" method.

@simpleidserver simpleidserver moved this from In Progress to Done in 2.0.4 Nov 12, 2020
@Delta-38
Copy link
Author

Ok, I can confirm that in 2.0.4 branch it works correctly. Looking forward to the release :)

@simpleidserver
Copy link
Owner

The release 2.0.4 is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
2.0.4
Done
Development

No branches or pull requests

2 participants