public IActionResult Get() { try { var employee = _reposetory.GetAllEmployees(); return(Ok(_mapper.Map <IEnumerable <EmployeeModel> >(employee))); } catch (Exception) { _logger.LogError("Failed to execute GET"); return(BadRequest()); } }
public IActionResult Get() { try { var employee = _reposetory.GetAllEmployees(); return(Ok(_mapper.Map <IEnumerable <EmployeeModel> >(employee))); } catch (Exception) { _logger.LogError("Failed to execute GET"); return(BadRequest()); } }