Asp.net Membership: Different Account Types

I have an application where users can store items. Now each account type can store a limited number of items. For example, a basic account can store 25 items, premium storage 50, and maximum can store unlimited items.

Now my question is, what would be the best way to do this?

At first I thought about just creating different roles for each type of account, but I think this is not very flexible. I guess another option is to create a profile property that has the maximum number of items an account can have. But maybe the profile property has some other limitations that I don't see at the moment?

Any input on this is greatly appreciated.

+2


source to share


3 answers


I would go beyond the built-in profile tables. You can always create a table called ItemStoreLog that has a unique user ID that matches your aspnet_user userId and another column that contains the item store distribution. Then when your user changes (+/-), you just update that table with the number of items to store.



+1


source


I've come across this before. The way I dealt with this is I have a profile profile account that gives the maximum default number for that profile based on its account type role. This way you get the best of both worlds.



0


source


I would use the built in aspnet roles functionality. There are good articles about it all over interweb, although this series of 4 roll guys can be a good starter.

0


source







All Articles