public IActionResult Get(int ctno) { var c = CitiesRepository.Get(ctno); if (c != null) { return(Ok(c)); } else { return(NotFound("No Such City")); } }
public EmployeeUser() { DesignationsRepository _designationRep = new DesignationsRepository(); Designations = _designationRep.Get(); DesignationList = Designations.ToDesignationSelectListItems(DesignationID); DepartmentRepository _departmentRep = new DepartmentRepository(); Departments = _departmentRep.Get(); DepartmentList = Departments.ToDepartmentSelectListItems(DepartmentCode); CitiesRepository _citiesRep = new CitiesRepository(); Cities = _citiesRep.Get(); CityList = Cities.ToCitySelectListItems(CityID); ProcedureNameHandling.GetSP = "GetCountry"; Countries = _basicRep.Get(); CountriesList = Countries.ToCountrySelectListItems(Nationality); ProcedureNameHandling.GetSP = "GetGender"; Genders = _basicRep.Get(); GenderList = Genders.ToGenderSelectListItems(GenderID); ProcedureNameHandling.GetSP = "GetEducation"; Educations = _basicRep.Get(); EducationList = Educations.ToEducationSelectListItems(EducationID); ProcedureNameHandling.GetSP = "GetReligion"; Religion = _basicRep.Get(); ReligionList = Religion.ToReligionSelectListItems(ReligionID); ProcedureNameHandling.GetSP = "GetMaritalStatus"; MaritalStatusCode = _basicRep.Get(); MaritalStatusList = MaritalStatusCode.ToMaritalStatusSelectListItems(MaritalStatusID); }
internal IEnumerable <City> Get() { return(_repo.Get()); }