Example #1
0
        public void Register(User model)
        {
            // Check if the model valid
            if (_validatorService.ValidateUser(model) == false)
            {
                throw new ValidationException(model.GetErrors());
            }

            // Save the user to database
            _database.Save(model);

            // Code to send email
            _emailService.SendUser(user);
        }