public async Task <ActionResult <Dialog> > CreateDialog(Dialog dialog) { _context.Dialogs.Add(dialog); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(CreateDialog), new { id = dialog.Id }, dialog)); }
public async Task <ActionResult <Questionnaire> > CreateQuestionnaire(Questionnaire questionnaire) { _context.Questionnaires.Add(questionnaire); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(CreateQuestionnaire), new { id = questionnaire.Id }, questionnaire)); }
public async Task <ActionResult <Report> > PostReport(Report report) { _context.Reports.Add(report); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetReport), new { id = report.Id }, report)); }
public async Task <ActionResult <Dialog> > CreateMessage(Message message) { _context.Messages.Add(message); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(CreateMessage), new { id = message.Id }, message)); }