asp.net mvc editing Membership User data
What is the best approach to allow a user to change his email address?
im using the built in membership provider and AccountController. in asp.net mvc 3
My app is using Entity Framework but im not sure if its correct to add that membershipUser to the edmx and create a UsersCon开发者_如何学Ctroller to do this... or add an action to accountController that handles this.
Please help
The membership provider has the ability to help you manage that. You would most likely add the ability into your AccountController
to do this. I wouldn't add it into your EF classes. It is handled outside of your database anyway (unless you've written a custom MembershipProvider
to talk to tables inside your database).
Take a look at this question too as it addresses some of what you may want to do and it includes source code.
精彩评论