コード例 #1
0
 public Models.TbPerguntaResposta ResponderParaTabela(Models.Request.AnuncioRoupasRequest.Resposta req)
 {
     Models.TbPerguntaResposta resp = new Models.TbPerguntaResposta();
     resp.IdRespondedor      = req.IdUsuarioRespondedor;
     resp.IdPerguntaResposta = req.IdPerguntaResposta;
     resp.DsResposta         = req.Texto.Trim();
     resp.BtRespondida       = true;
     return(resp);
 }
コード例 #2
0
 public ActionResult <Models.Response.AnuncioRoupasResponse.PerguntaEResposta> Responder(Models.Request.AnuncioRoupasRequest.Resposta req)
 {
     try
     {
         Models.TbPerguntaResposta a = conversorAnuncio.ResponderParaTabela(req);
         Models.TbPerguntaResposta b = businessAnuncio.Responder(a);
         return(conversorAnuncio.ResponderParaResponse(b));
     }
     catch (System.Exception ex)
     {
         return(BadRequest(new Models.Response.Erro(400, ex.Message)));
     }
 }