Exemple #1
0
        public void SetLastname(string lastname)
        {
            if (string.IsNullOrEmpty(lastname))
            {
                throw new DatingAppException(ErrorCode.Empty(nameof(lastname)));
            }

            this.Lastname = lastname;
        }
Exemple #2
0
        public void SetFristname(string firstname)
        {
            if (string.IsNullOrEmpty(firstname))
            {
                throw new DatingAppException(ErrorCode.Empty(nameof(firstname)));
            }

            this.Firstname = firstname;
        }
Exemple #3
0
        public void SetUsername(string username)
        {
            if (string.IsNullOrEmpty(username))
            {
                throw new DatingAppException(ErrorCode.Empty(nameof(username)));
            }

            this.Username = username;
        }
Exemple #4
0
        public void SetEmail(string email)
        {
            if (string.IsNullOrEmpty(email))
            {
                throw new DatingAppException(ErrorCode.Empty(nameof(email)));
            }

            this.Email = email;
        }
Exemple #5
0
        public void SetPassword(string hash, string salt)
        {
            if (string.IsNullOrEmpty(hash) || string.IsNullOrEmpty(salt))
            {
                throw new DatingAppException(ErrorCode.Empty("password"));
            }

            this.Hash = hash;
            this.Salt = salt;
        }