Esempio n. 1
0
        public string AddUser(IFormCollection value)
        {
            var email    = value["email"];
            var nickName = value["nickName"];
            var password = value["password"];
            var avatar   = value["avatar"];

            var users  = new UsersDB();
            var result = users.Add(nickName, email, password, avatar);

            return("New Users Added succesffully");
        }
Esempio n. 2
0
        public Task <DataResponse <User> > AddUserAsync(BasicRegisterRequest request)
        {
            var user = new User
            {
                Name        = request.Name,
                Credentials = new Credentials
                {
                    Pitz = new PitzCredentials
                    {
                        Email    = request.Email,
                        Password = request.Password
                    }
                }
            };

            UsersDB.Add(user);

            return(Task.FromResult(new DataResponse <User>(true, user)));
        }