I have a ASP.NET MVC4 project in which I would like to use the SimpleMembership. The application has a Person table that holds relevant information about users in the system.
I would like a link between the currently logged in user and the Person information. So I have made a foreign key in the Person table to the UserId column of UserProfile table (from SimpleMembership).
I use Entity Framework 5 as ORM and have implemented a generic repository to handle CRUD methods and so on.
Now I am at a point where I want to implement user profile creation. The creation consists of 2 parts parts:
- login: username and password (to be stored in SimpleMembership tables)
- personal information (to be stored in Person table)
In order to create a user I guess I need to:
- Save user information through SimpleMembership
- Save personal information together with userId from step 1 through my PersonRepository
I would like some kind of UserRepository that could save SimpleMembership data but I do not know if it's the right approach? Is there a better approach?