public ActionResult <IEnumerable <Offering> > GetOfferingsByIdFamily(int id)
        {
            if (!_families.GetAllItems().Any(x => x.Id == id))
            {
                return(NotFound());
            }
            var offerings = _offerings.GetItemsByParentId(id);

            return(offerings.ToList());
        }
Exemplo n.º 2
0
        public ActionResult <IEnumerable <Department> > GetDepartmentsByIdOffering(int id)
        {
            if (!_offerings.GetAllItems().Any(x => x.Id == id))
            {
                return(NotFound());
            }
            var departments = _departments.GetItemsByParentId(id);

            return(departments.ToList());
        }
Exemplo n.º 3
0
        public ActionResult <IEnumerable <Country> > GetCountriesByIdOrganization(int id)
        {
            if (!_organizations.GetAllItems().Any(x => x.Id == id))
            {
                return(NotFound());
            }
            var countries = _countries.GetItemsByParentId(id);

            return(countries.ToList());
        }
Exemplo n.º 4
0
        public ActionResult <IEnumerable <Family> > GetFamiliesByIdBusiness(int id)
        {
            if (!_businesses.GetAllItems().Any(x => x.Id == id))
            {
                return(NotFound());
            }
            var families = _families.GetItemsByParentId(id);

            return(families.ToList());;
        }
        public ActionResult <IEnumerable <Business> > GetBusinessesByIdCountry(int id)
        {
            if (!_countries.GetAllItems().Any(x => x.Id == id))
            {
                return(NotFound());
            }
            var businesses = _businesses.GetItemsByParentId(id);

            return(businesses.ToList());
        }