public IActionResult Post([FromBody] PontosVO obj) { if (obj == null) { return(BadRequest()); } return(new OkObjectResult(_objBusiness.Create(obj))); }
public IActionResult Post([FromBody] PedidosVO obj) { if (obj == null) { return(BadRequest()); } PontosVO pontos = new PontosVO { Valor = obj.Valor, Descricao = obj.Descricao, Data = obj.Data, UserId = obj.UserId }; _PontosBusiness.Create(pontos); var user = _UserDadosBusiness.FindById(obj.UserId); user.Pontos = user.Pontos + obj.Valor; _UserDadosBusiness.Update(user); return(new OkObjectResult(_objBusiness.Create(obj))); }