Beispiel #1
0
        public IEnumerable <Department> AllIncluding(params Expression <Func <Department, object> >[] includeProperties)
        {
            IEnumerable <Department> _departments = _departmentRepository
                                                    .AllIncluding(includeProperties)
                                                    .ToList();

            return(_departments);
        }
        public IActionResult Get()
        {
            var departments = _departmentRepository.AllIncluding(emp => emp.Employees).Where(rs => rs.RecordStatus == RecordStatus.Active);

            if (departments.Any())
            {
                return(Ok(departments));
            }
            return(NoContent());
        }