I've started using the membership provider in a new asp.net mvc project. My membership model is quite dissimilar to the default model but I assumed I could customize it to my liking. It seams though that I'm creating a custom implementation for everything I'm doing.
My model has two types (inheriting from the same base) of User entities and a Customer entity.
public class Customer
{
/* properties go here */
// users linked with this customer
public virtual IList<TypeOneUser> TypeOneUsers { get; set; }
public virtual IList<TypeTwoUser> TypeTwoUsers { get; set; }
}
public abstract class User
{
/* user properties go here */
}
public class TypeOneUser: User
{
public virtual IList<Customer> Customers { get; set; }
}
public class TypeTwoUser: User
{
public virtual Customer Customer { get; set; }
}
I'm currently considering just implementing a Customer repository and User repository and scrapping the membership provider. So my question is, is there a straight forward way to implement my membership model with the membership provider? At the moment I have the User classes mostly implemented with a custom membership provider but I'm not sure how to integrate the Customer entity with the membership provider.
Also I'm using Fluent Nhibernate so I'm writing my own persistence code regardless of my approach.