예제 #1
0
        internal Profile GetOrCreateProfile(Profile userInfo)
        {
            Profile foundProfile = _repo.GetByEmail(userInfo.Email);

            if (foundProfile == null)
            {
                return(_repo.Create(userInfo));
            }
            return(foundProfile);
        }
예제 #2
0
        public Profile GetOrCreateProfile(Profile userInfo)
        {
            Profile profile = _profilesRepository.GetByEmail(userInfo.Email);

            if (profile == null || profile.Id == null)
            {
                return(_profilesRepository.Create(userInfo));
            }
            return(profile);
        }