internal Profile GetOrCreateProfile(Profile userInfo)
        {
            Profile profile = _repo.GetOne(userInfo.id);

            if (profile == null)
            {
                return(_repo.Create(userInfo));
            }
            return(profile);
        }
Exemple #2
0
        internal Profile GetOne(string id)
        {
            Profile foundprofile = _repo.GetOne(id);

            if (foundprofile == null)
            {
                throw new Exception("Profile doesn't exist");
            }
            return(foundprofile);
        }