Пример #1
0
        internal static Result <User> Create(CreateUserDto dto, INormalizer normalizer, IPasswordService passwordService)
        {
            User user = null;

            return(UserFullname.Create(dto.Firstname, dto.Lastname)
                   .Tap(n => user = new User(n))
                   .Bind(_ => user.UpdateEmail(dto.Email, normalizer))
                   .Bind(() => user.SetPassword(dto.Password, passwordService))
                   .Map(() => user));
        }
Пример #2
0
    public static UserFullname Parse(SqlString s)
    {
        if (s.IsNull)
        {
            return(Null);
        }
        UserFullname text = new UserFullname();
        string       str  = s.ToString();

        text._text = str;
        return(text);
    }
Пример #3
0
 private User(UserFullname name)
 {
     Id   = Guid.NewGuid().ToString();
     Name = name;
 }