public IActionResult Get(int id) { Staffs.Staffs staff = StaffApiHelper.GetStaffs(id, StaffList); if (staff == null) { return(NotFound()); } else { return(Ok(staff)); } }
public IActionResult Post([FromBody] object json) { StaffList.Add(StaffApiHelper.InsertStaff(json, StaffList)); staffdb.WriteData(StaffList); return(Ok(StaffList[StaffList.Count - 1])); }