public IActionResult Create(string memberId, int rec_no, string colledge_name, string degree, string faculty) { var member = _context.member.Single(m => m.id == new Guid(memberId)); var mem_education = new mem_education(); mem_education.member_code = member.member_code; mem_education.rec_no = rec_no; mem_education.colledge_name = colledge_name; mem_education.degree = degree; mem_education.faculty = faculty; mem_education.x_status = "Y"; _context.mem_education.Add(mem_education); _context.SaveChanges(); return(Json(new { result = "success" })); }
// GET: mem_education/Details/5 public IActionResult Details(string id) { if (id != null) { mem_education me = _context.mem_education.Single(m => m.id == new Guid(id)); if (me != null) { return(Json(new { id = me.id, rec_no = me.rec_no, colledge_name = me.colledge_name, degree = me.degree, faculty = me.faculty })); } else { return(NotFound()); } } else { return(NotFound()); } }