public async Task <IActionResult> Register([FromBody] UserProfileRequest request)
 {
     try
     {
         return(Ok(await facade.Register(request)));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
示例#2
0
        public void Register()
        {
            request.Email     = "*****@*****.**";
            request.Password  = "******";
            request.FirstName = "Boy";
            request.LastName  = "Simamora";
            request.Gender    = 1;
            request.Age       = 24;
            request.Role      = "Admin";

            var isValid = facade.Register(request);

            Assert.True(isValid.Result.IsSuccess);
        }