public DataContract.PagedList <Remark> GetRemarks(string employeeId, string pageSize, string pageNum, string orderBy, string isDescending) { try { var pagingInfo = PagingHelper.GetPagingInfo(pageSize, pageNum, orderBy, isDescending); var result = _manager.GetRemarks(employeeId, pagingInfo.PageNumber, pagingInfo.PageSize, pagingInfo.OrderBy, pagingInfo.IsDescending); if (result == null) { return(null); } return(result.ToDataContract()); } catch (Exception ex) { //var rethrow = ExceptionPolicy.HandleException("service.policy", ex); //if (rethrow) throw; //return null; throw ex; } }
public async Task <DataContract.PagedList <Employee> > GetEmployeesAsync(string pageSize, string pageNum, string orderBy, string isDescending) { try { var pagingInfo = PagingHelper.GetPagingInfo(pageSize, pageNum, orderBy, isDescending); var result = await _manager.GetAllAsync(pagingInfo.PageNumber, pagingInfo.PageSize, pagingInfo.OrderBy, pagingInfo.IsDescending); if (result == null) { return(null); } return(result.ToDataContract()); } catch (Exception ex) { var rethrow = ExceptionPolicy.HandleException("service.policy", ex); if (rethrow) { throw; } return(null); } }