//we need `FromBody` since this is a complex type public int Remove(int unitId) { var unit = _context.Units.Find(unitId); _context.Remove(unit); _context.SaveChanges(); return(0); }
//we need `FromBody` since this is a complex type public int Remove(int studentId) { var student = _context.Students.Find(studentId); _context.Remove(student); _context.SaveChanges(); return(0); }