public ActionResult Update([FromBody] TDTO dto) { try { var result = ((IValidator)Activator.CreateInstance(typeof(TValidator))).Validate(dto); if (result.IsValid) { var sucess = OperationBase.Update(dto.Adapt <TEntity>()); return(Ok(sucess)); } else { return(BadRequest(result.ToString())); } } catch (Exception e) { return(StatusCode(StatusCodes.Status500InternalServerError, e)); } }