public HttpResponseMessage Post([FromBody] Patrimonio patrimonio) { try { _patrimonioRepository.PostPatrimonio(patrimonio); return(Request.CreateResponse(HttpStatusCode.OK, "Patrimonio cadastrada com sucesso", "application/json")); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message, "application/json")); } }