public IActionResult GetSkillbook(int jobId) { SkillBook book = SkillFactory.GetSkillBook(jobId); if (book == null) { return(NotFound()); } return(Json(book)); }
public IActionResult GetSkillFromBook(int jobId, int skillId) { SkillBook book = SkillFactory.GetSkillBook(jobId); if (book == null) { return(NotFound("Couldn't find skillbook")); } Skill skill = book.Skills.Where(c => c.id == skillId).FirstOrDefault(); if (skill == null) { return(NotFound("Couldn't find skill in book")); } return(Json(skill)); }