Beispiel #1
0
        public IActionResult GetName(int id)
        {
            //PersonDataStore ds = new PersonDataStore();
            //Person p = ds.Persons.FirstOrDefault(p => p.Id == id);

            //Person p = _ds.Persons.FirstOrDefault(p => p.Id == id);
            Person p = _ds.GetById(id);

            if (p == null)
            {
                return(NotFound());
            }

            //return new JsonResult(p);
            return(Ok(p));
        }
        public IActionResult GetSkillsOfApplicant(int applicantId)
        {
            //PersonDataStore ds = new PersonDataStore();
            //Person p = ds.Persons.FirstOrDefault(p => p.Id == applicantId);

            //Person p = _ds.Persons.FirstOrDefault(p => p.Id == applicantId);
            Person p = _ds.GetById(applicantId);

            if (p == null)
            {
                return(NotFound());
            }

            //return new JsonResult(p.Skills);
            return(Ok(p.Skills));
        }