1

I'd like to use forms authentication for an MVC project but I would also like to associate a few extra properties to the user profile (profile picture, birth date, etc).

Is there a way to simply extend the User object used by forms authentication to store and retrieve these extra properties?

4

1 回答 1

3

只需在您的数据库中有一个额外的表(例如UserDetails),然后您可以将用户 ID 映射到会员用户表。

然后,您可以在该属性上添加您需要的所有其他属性。我会说这比破解并将附加属性添加到实际的成员资格类更干净。

于 2013-05-30T15:36:38.883 回答