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

Adding a NoSQL data provider (Couchbase) #291

Open
mgroves opened this issue Sep 10, 2018 · 3 comments
Open

Adding a NoSQL data provider (Couchbase) #291

mgroves opened this issue Sep 10, 2018 · 3 comments

Comments

@mgroves
Copy link

mgroves commented Sep 10, 2018

It was suggested on Twitter that I could try creating a data provider using a NoSQL database (like Couchbase). I took a look at the code and there appears to be a Data.Abstractions project that I could use pretty easily. However, I'm not quite sure how to proceed with a couple of other pieces, and it looks like the architecture might be tightly coupled with EF.

  • AddRepositores in StartupExtensions.cs - it looks like I could add another case statement here, but what about the AddDbContextPool that follows. Is that something that's EF specific?
  • ConfigureDb in IdentityHostingStartup.cs - this looks like it also contains some EF specific code?

Am I wrong about the tight coupling with EF? How should I proceed?

@csharpfritz
Copy link
Owner

EF tight-coupling has been dropped... and you should be able to implement IRepository objects appropriately

@mgroves
Copy link
Author

mgroves commented Sep 22, 2018

I'm still having trouble trying to figure out where to start. In Startup.cs, there's a call to services.ConfigureDatabase, which in turn calls services.AddRepositories. AddRepositories seems very much coupled to EF. I can think of a few ways to refactor this, but I'm guessing your intent is that I shouldn't have to make changes to Startup.cs. Could you perhaps point me in the right direction? Or if you already covered this in a stream, could you point me toward the correct recording?

@csharpfritz
Copy link
Owner

You're right.... we will need to put a provider lookup into the ConfigureDatabase methods.

We'll take care of that on stream very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants