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

ASP.Net Membership #87

Open
ropez opened this issue Nov 10, 2017 · 0 comments
Open

ASP.Net Membership #87

ropez opened this issue Nov 10, 2017 · 0 comments

Comments

@ropez
Copy link

ropez commented Nov 10, 2017

Trying to get some testing going on a lagacy project, with code using ASP.Net membership scattered all around it. Is there a way to inject the an existing DbConnection or DbContest into the default providers SqlMembershipProvider and SqlRoleManager?

What I have done so far, is to set up ASP.Net Membership with custom providers that are just mockup. But with this solution, I end up with duplication in the test setup. I have to set up user accounts both in those mockup classes, and in the database (because there is also code that access the aspnet_Membership tables directly!). I'm thinking, I need to set up those mockup classes to actually use the Effort database, but I fear I will just end up re-implementing the default providers, and there should be a way to just inject the connection into the existing ones, right?

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

No branches or pull requests

1 participant