Ejemplo n.º 1
0
        public async Task <IUser> ExecuteService(String userName, String password)
        {
            try
            {
                UserModel user = new UserModel
                {
                    Id       = MongoDbIdGenerator.Generate(),
                    Name     = userName,
                    Password = passwordUtils.EncryptPassword(password)
                };

                IUser createdUser = await this.userRepo.Create(user);

                return(createdUser);
            }
            catch (Exception except)
            {
                throw new Exception(except.Message);
            }
        }