I’m using ASP.NET MVC.
I’m also using the MySQL connector and providers to connect to a MySQL database, which is using the ASP.NET Membership schema.
I also have a second table called ‘user’ which contains all the additional user data, company_id etc.
As I am going to need the (complete) User object for every page, what is the best way to access and persist the complete User object?
Should I be thinking about the User object with my extra data and the Membership User as different things, or is there a decent way to merge the two into one ‘User’ entity and access this on each page?
Thanks
Membership user and your User are two different things. But Membership user can persist ID of your User so you can bind these two together.
Or you can store Membership ID as the key for your Users.