public ActionResult <ProdutoDTO> CadastrarLance([FromBody] LanceDTO DataLance) { try { ClaimsIdentity identity = (ClaimsIdentity)HttpContext.User.Identity; Leilao le = new Leilao(db); le.CadastrarLance(DataLance, identity); return(StatusCode(200, new { message = "Lance Efetuado com Sucesso" })); } catch (HttpException ex) { return(StatusCode((int)ex.CodeStatus, new { ID = ex.traceID, Error = ex.Message, Describe = ex.describe })); } }