public async Task <IActionResult> Testimonials([Bind("Id,Name,Company,Message,DatePublished,Publish")] TestimonyModel testimonyModel) { if (ModelState.IsValid) { _context.Add(testimonyModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Thanks))); } return(View(testimonyModel)); }
public async Task <IActionResult> Create([Bind("Id,Name,PhoneNumber,EmailAddress,Message")] ContactClientModel contactClientModel) { if (ModelState.IsValid) { _context.Add(contactClientModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Thanks))); } return(View(contactClientModel)); }
public async Task <IActionResult> DeleteConfirmed(string id) { var model = await _context.AspNetUsers.FindAsync(id); _context.AspNetUsers.Remove(model); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }