public ActionResult <string> Get() { var servico = new ServicoCadastroQuestao(); var questao = servico.Obtenha(); return(CustomResponse(questao)); }
public async Task <ActionResult> PostAsync([FromBody] QuestionModel model) { var insertCommand = new InsertQuestionCommand() { Descricao = model.Descricao }; var servico = new ServicoCadastroQuestao(); if (insertCommand.EhValido()) { await servico.Insert(insertCommand); return(CustomResponse(model)); } return(CustomResponse(insertCommand)); }