public GetAllDepartmentResponse GetAll() { GetAllDepartmentResponse response = new GetAllDepartmentResponse(); try { IList<Department> lstDepartment = _departmentService.GetAll(); response.List = lstDepartment.MapToDepartmentViewModelList(); response.Success = true; } catch (Exception ex) { response.Success = false; response.Message = ex.Message; } return response; }
public GetAllDepartmentResponse GetAll() { GetAllDepartmentResponse response = new GetAllDepartmentResponse(); try { IList <Department> lstDepartment = _departmentService.GetAll(); response.List = lstDepartment.MapToDepartmentViewModelList(); response.Success = true; } catch (Exception ex) { response.Success = false; response.Message = ex.Message; } return(response); }