public async Task <IActionResult> PutFaq(int id, Models.Faq faq) { if (id != faq.Id) { return(BadRequest()); } _vyContext.Entry(faq).State = EntityState.Modified; try { await _vyContext.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FaqExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <QuestionForm> > PostContact(QuestionForm questionForm) { _vyContext.QuestionForms.Add(questionForm); await _vyContext.SaveChangesAsync(); return(Ok()); }