public IHttpActionResult Put(int?id, [FromBody] TestVM testVM) { if (id == null || testVM == null || !testVM.isWalid()) { return(BadRequest()); } try { _testService.Change(id.GetValueOrDefault(), Mapper.Map <TestDTO>(testVM)); } catch (BILException myExc) { return(InternalServerError(myExc)); } return(Ok()); }