Exemplo n.º 1
0
        public IHttpActionResult GetByUserId(long userId)
        {
            try
            {
                var employeeDto = _employeeAppService.GetByUserId(userId);

                if (employeeDto != null)
                {
                    var employeeModel = Mapper.Map <EmployeeModel>(employeeDto);

                    return(Ok(employeeModel));
                }

                return(Ok(false));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }