public ActionResult Create(EventViewModel eventViewModel) { EventModel eventModel = new EventModel() { Title = eventViewModel.Title, StartTime = eventViewModel.StartTime, TypeOfEvent = eventViewModel.TypeOfEvent, EventDate = eventViewModel.EventDate, DurationInHours = eventViewModel.DurationInHours, Description = eventViewModel.Description, OtherDetails = eventViewModel.OtherDetails, InviteByEmail = eventViewModel.InviteByEmail, }; EventOperations eventOperation = new EventOperations(); int eventId = eventOperation.createEvent(eventModel, User.Identity.Name); return(RedirectToAction("Index", "Home")); }