1) If i want to use the asp.net membership provider in a code first EF 4.1 project how can i make the relations? For example i have an entity which have a 1 to n relation to the User Table.
I want to write something like this:
public virtual ICollection Users { get; set; }
How can i realize this without making my own User Entity?
2) Does SQL Compact contain Membership Provider?
Since you’re using code first, you’ll need to create the User Entity.
Then, you can map this entity to the
aspnet_Userstable, assuming you have already installed the membership database tables into your database.Finally, you need to map the relationships that other entities have with the
Useryou just created.