public ActionResult <object> Etapas(StringChat text) { if (text.texto == "") { var result = _db.MensagemOuPergunta.Where(x => x.Id == 1).FirstOrDefault(); return(result); } else { var result = _db.MensagemOuPergunta.Where(x => x.Id == Convert.ToInt32(text.texto)).FirstOrDefault(); return(result); } }
public ActionResult <object> Respostas(StringChat text) { var result = _db.Resposta.Where(x => x.CodEtapa == Convert.ToInt32(text.texto)).ToList(); return(result); }