public async Task <IActionResult> Create([Bind("Id,DateAdded,Question,Answer")] QnAPair qnAPair) { if (ModelState.IsValid) { _context.Add(qnAPair); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(qnAPair)); }
public async Task <IActionResult> Create([Bind("Id,ServiceId,BaseAddress,Key,DisplayName,DisplayCategory")] QnAMakerService qnAMakerService) { if (ModelState.IsValid) { _context.Add(qnAMakerService); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(qnAMakerService)); }