コード例 #1
0
        public List <EmployeeBLLModel> FetchAll(bool includeRetired)
        {
            var result = new List <EmployeeBLLModel>();

            try
            {
                if (includeRetired == true)
                {
                    result = _dataAccessService.FetchAllEmployee();
                }
                else
                {
                    result = _dataAccessService.FetchAllEmployee()
                             .Where(x => x.IsRetired == false).ToList();
                }
                result = _dataAccessService.FetchAllEmployee(); //.OrderBy(x => x.Sequence);
                //result = result.Where(x => includeRetired || x.IsRetired == false).ToList();
            }
            catch (Exception e)
            {
                //result.Errors.Add(e.BuildExceptionMessage());
            }
            return(result);
        }