public IHttpActionResult Update([FromBody] ClassUpdateModel classToUpdate, [FromUri] int classId) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _service = new ClassService(); _service.UpdateClass(classToUpdate, classId); return(Ok()); }