开发者

Lost on membership provider

开发者 https://www.devze.com 2023-04-09 03:28 出处:网络
I\'m confused in the proper time to use SQLMembershipProvider vs my own custom provider. I\'m building a system where users can create accounts; and then create objects in our system. When a user logs

I'm confused in the proper time to use SQLMembershipProvider vs my own custom provider. I'm building a system where users can create accounts; and then create objects in our system. When a user logs in, he should be able to see and edit the objects that he created.

Now, can I do this by using the SQLMembershipProvider? My understanding is that SQLMembershipProvider stores the users in its own database. If this is the case, how can I associate my objects with the user that created them? I've read about the Profile Properties system, but it doesn't seem like that would work, as that just adds extra information, like a postal code, to the .Net u开发者_C百科sers object.

What would my object table look like; as in what would the column that says which user created the object be?

Or, do I just have to create a custom MembershipProvider which stores the users in my own database?


All you need is for your object table to have a UserId column that's a foreign key to the User table that the SQLMembershipProvider creates.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号