Pergunta

I'm trying my hands on the SimpleMembershipProvider that can be used with EntityFramework and MVC4. But, when creating an internet application using the "new project wizard", it incorporates all this logic into my web project.

As I want to keep things seperate, I have a business layer (already references EF) where I have my context and my DbSet's for EF. I would like to do all my user related stuff in that layer as well, yet don't really know how to go about this...

How do I make use of the ease of SimpleMembershipProvider (and roles) in my web project but doing all database related stuff in my business layer? Do I still need references to EF in my Web project (I guess not, once everything is set up correctly)?

I tried finding some information about this, but was not really successful so far.

Foi útil?

Solução

Take at the open source project SimpleSecurity on CodePlex which provides an example of how to move SimpleMembership into a separate layer. You can read about it here.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top