IdentityServer / IdentityServer3.Admin.EntityFramework

Apache License 2.0
12 stars 30 forks source link

Oracle support #28

Open designsinnovate opened 7 years ago

designsinnovate commented 7 years ago

Hello,

I followed steps from Support for other RDBMS than SQL Server for adding Oracle support.

But ran into issues trying IdentityAdmin and followed the trail to IdentityAdminCoreManager.cs that uses hard coded DB context instances.

At first I thought I could just write my own service like shown here, copy paste the entire IdentityAdminCoreManager code, and then modify all contexts with my own

Then I thought I could create a new class constructor that accepts DB contexts but being very new to EF, I wasn't sure of impacts this would cause having single instance of each DB context. I noticed manager class methods creates and disposes a context instance each time it is invoked

So I am trying out this 3rd option where I can set the type of context and use that to create an instance. It's working great.

https://github.com/designsinnovate/IdentityServer3.Admin.EntityFramework/commit/3b05a0efde87f0601478aa628ce748d70b76579c

Could you please review the change when you get a chance? I will go ahead and update rest of the class and submit a pull request if this approach seems ok.

Thanks