You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
andSqlRoleManager
?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?
The text was updated successfully, but these errors were encountered: