Example #1
0
        internal Account GetById(int id, string userId)
        {
            Account foundAccount = _repo.GetById(id, userId);

            if (foundAccount == null)
            {
                throw new Exception("Invalid ID / User ID");
            }
            return(foundAccount);
        }
Example #2
0
        internal Account GetOrCreateAccount(Account userInfo)
        {
            Account account = _repo.GetById(userInfo.Id);

            if (account == null)
            {
                return(_repo.Create(userInfo));
            }
            return(account);
        }
Example #3
0
 internal string GetProfileEmailById(string id)
 {
     return(_repo.GetById(id).Email);
 }