asp.net mvc编辑会员用户数据
允许用户更改其电子邮件地址的最佳方法是什么?
我使用内置的会员提供程序和 AccountController。在 asp.net mvc 3 中,
我的应用程序正在使用实体框架,但我不确定将该 MembersUser 添加到 edmx 并创建一个 UsersController 来执行此操作是否正确...或向 accountController 添加一个处理此操作的操作。
请帮忙
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 UsersController to do this... or add an action to accountController that handles this.
Please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
会员资格提供商有能力帮助您管理这一点。您很可能会在
AccountController
中添加此功能来执行此操作。我不会将其添加到您的 EF 课程中。无论如何,它都是在数据库外部处理的(除非您编写了自定义MembershipProvider
来与数据库内的表进行通信)。也看看这个问题它解决了您可能想做的一些事情,并且包含源代码。
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 customMembershipProvider
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.