I am trying to create a web site app using MVC 3- The problem is I want to setup a website where a user signs in they see data only specific to them. For example when you log into facebook, you only see your “wall” and not other peoples.
Can someone point me to a tutorial on how to setup a database where data can be connected to a user?
thanks in advance!
Have a table in your own data model that uses a primary key UserName. This is the value that will determine which wall you show to the user.
When a user registers, after you create them using the ASP.NET Membership Provider, add a new row to the Users table giving the same UserName as the UserName in the membership provider (for simplicity, we use email address for username — easier to guarantee uniqueness). You can execute queries for their wall data by using the User property of the Controller class.