Asp.net MVC 为什么我要为配置文件提供程序烦恼?

发布于 2024-08-18 12:51:02 字数 74 浏览 3 评论 0原文

我已经有一个包含大约 20 个用户配置文件信息字段的数据库。我不确定创建自定义提供程序有什么优势。有人可以解释一下有什么好处吗?谢谢。

I already have a database with about 20 fields of userprofile information. Im not sure what the advantage would be for creating a custom provider instead. Can someone explain what is the benefit? thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

往日情怀 2024-08-25 12:51:02

可能对你没有任何好处。

配置文件允许您管理用户
信息,而不需要您
创建并维护您自己的数据库。

您已经涵盖了这一点,因此我能想到的唯一其他主要优势是,配置文件提供了一种在用户登录时处理将匿名使用数据迁移到用户配置文件的简单方法。您可以挂钩某些事件以便与任何配置文件提供程序一起处理该问题,无论它是否是自定义的。

仔细阅读配置文件文档可能会帮助您确定是否存在是您的应用程序的任何优势。

There may not be any benefit for you.

Profiles allow you to manage user
information without requiring you to
create and maintain your own database.

You've already got that covered, so the only other major advantage that I can think of is that profiles provide are an easy way of handling migration of anonymous usage data to the user's profile when they log in. There are events that you can hook into for handling that with any profile provider, whether it's custom or not.

A solid read through the documentation on profiles might help you decide if there is any advantage for your app.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文