简体   繁体   中英

Visual Studio MVC Web App user data

I am new to visual studio and databases. I have tried to find this answer on my own for several days, but I haven't found what I need, probably because I am not using the correct terms.

Short background: I am interested in building a web app that will take user input, store it, and then display that information in charts. Of course, this requires unique user logins.

What I want to understand is how information specific to a unique user is loaded into the site. So far, I've learned to pull static data from a database and put it in the website. However, that does not tell me anything about unique users' data when they log in with their account. So, when I log in to, for example, my online banking account or a site like Udemy, what tells the site to pull only my data? What's the key to displaying just my data?

If you have a resource instead, I'd be happy to read that. Thank you.

You need some form of a unique identifier for that particular user. Whether this is in the form of a user Id as an auto-incrementing primary key, a Guid, or something else, it should be unique to that user in that particular table.

From that unique user Id you should then be able (depending on the db), to find data associated with that unique user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM