public Profile Create(Profile newProfile)
        {
            int id = _repo.Create(newProfile);

            newProfile.Id = id;
            return(newProfile);
        }
Example #2
0
        internal Profile GetOrCreateProfile(Profile userInfo)
        {
            Profile foundProfile = _repo.GetByEmail(userInfo.Email);

            if (foundProfile == null)
            {
                return(_repo.Create(userInfo));
            }
            return(foundProfile);
        }
        internal Profile GetOrCreateProfile(Profile userInfo)
        {
            Profile profile = _repo.GetById(userInfo.Id);

            if (profile == null)
            {
                return(_repo.Create(userInfo));
            }
            return(profile);
        }
Example #4
0
        public Profile GetOrCreateProfile(Profile userInfo)
        {
            Profile profile = _profilesRepository.GetByEmail(userInfo.Email);

            if (profile == null || profile.Id == null)
            {
                return(_profilesRepository.Create(userInfo));
            }
            return(profile);
        }
Example #5
0
        public Profile GetorCreate(Profile userInfo)
        {
            Profile foundprofile = _repo.Get(userInfo.Email);

            if (foundprofile == null)
            {
                return(_repo.Create(userInfo));
            }
            return(foundprofile);
        }
        public Profile GetOrCreateProfile(Profile userInfo)
        {
            Profile foundProfile = _repo.GetOneProfile(userInfo.Id);

            if (foundProfile == null)
            {
                return(_repo.Create(userInfo));
            }
            return(foundProfile);
        }
Example #7
0
 public Profile Create(Profile newProfile)
 {
     return(_repo.Create(newProfile));
 }