public ActionResult Create(EventObj eventobj) { if (ModelState.IsValid) { db.Events.Add(eventobj); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eventobj)); }
public ActionResult Create([Bind(Include = "EventID,EventType,DateOfEvent,Venue,NoOfGuest")] EventOrder eventOrder) { if (ModelState.IsValid) { db.EventOrder.Add(eventOrder); db.SaveChanges(); ViewBag.IsSuccess = "Event Order Successfully"; return(View()); } return(View(eventOrder)); }
public ActionResult Signup(Clients model) { using (var context = new EventPlannerEntities()) { context.Clients.Add(model); context.SaveChanges(); } return(RedirectToAction("Login")); }