public async Task <IActionResult> Create([Bind("ServiceId,ServiceTitle,ServiceDescription,ServiceDate,ServiceImage")] Services services) { if (ModelState.IsValid) { _context.Add(services); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(services)); }
public async Task <IActionResult> Create([Bind("EventId,EventTitle,EventDescription,EventDate,EventImage")] Events events) { if (ModelState.IsValid) { _context.Add(events); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(events)); }