private void Init()
 {
     _account = new UserAccount(Username, Password, new User())
     {
         AccountExpiration = DateTime.Now.AddMonths(3),
         IsActive = true
     };
 }
 public Membership GetMembershipByAccount(UserAccount account)
 {
     throw new Exception("Data Repository is unavailable!");
     //Normally we'd call our repository to get this object
 }
        public bool IsUserValid(UserAccount accountToValidate)
        {
            bool isExpired = accountToValidate.AccountExpiration > DateTime.Now;

            return isExpired && accountToValidate.IsActive;
        }
 public Membership GetAccountMembershipByAccount(IMembershipProvider provider, UserAccount account)
 {
     return provider.GetMembershipByAccount(account);
 }
 public Membership(UserAccount account)
 {
     CreationDate = DateTime.Now;
     Update = DateTime.Now;
     RelatedUserAccount = account;
 }