public static void CreateUserAndAccount(string userName, string password, bool isPaid) { using (UnitOfWork unitOfWork = new UnitOfWork()) { PhotographyManagerMembershipProvider provider = new PhotographyManagerMembershipProvider(unitOfWork); provider.CreateUserAndAccount(userName, password, isPaid); } }
public static bool Login(string userName, string password, bool persistCookie = false) { using (UnitOfWork unitOfWork = new UnitOfWork()) { PhotographyManagerMembershipProvider provider = new PhotographyManagerMembershipProvider(unitOfWork); bool success = provider.ValidateUser(userName, password); if (success) { FormsAuthentication.SetAuthCookie(userName, persistCookie); } return(success); } }