CapRaffle.Domain.Implementation.AccountRepository.Create C# (CSharp) Method

Create() public method

public Create ( string email, string password, string name ) : bool
email string
password string
name string
return bool
        public bool Create(string email, string password, string name)
        {
            if (string.IsNullOrEmpty(password)) password = GeneratePassword();

            User user = new User();
            email = email.ToLower();
            String passwd = CreatePasswordHash(password, CreateSalt(email));
            user.Email = email;
            user.Password = passwd;
            user.Name = name;
            context.AddToUsers(user);
            context.SaveChanges();
            return true;
        }