public async Task <IActionResult> AddUser([FromBody] UserModel User)
        {
            try
            {
                var result = await _ISupervisor.AddUser(User);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
 public object Post([FromBody] UserViewModel userViewModel)
 {
     try
     {
         var result = _supervisor.AddUser(userViewModel);
         return(result);
     }
     catch (Exception ex)
     {
         _logger.LogError(ex, "Exception: ");
         return(StatusCode(500, ex));
     }
 }