public ActionResult Create(EventDataViewModel e)
        {
            e.CreatedDate = DateTime.UtcNow;
            e.UpdatedDate = DateTime.UtcNow;

            Mapper.CreateMap<EventDataViewModel, Event>();
            var evt = Mapper.Map<EventDataViewModel, Event>(e);

            _eventService.Insert(evt);

            return RedirectToAction("Details", new { id = evt.ID });
        }
        public ActionResult Details(int id)
        {
            var e = _eventService.GetByID(id);
            var eViewModel = new EventDataViewModel();

            if (e != null && e.ID > 0)
                eViewModel = new EventDataViewModel()
                {
                    Id = e.ID,
                    Name = e.Name,
                    IsPublished = e.IsPublished,
                    StartDate = e.StartDate.ToString(),
                    EndDate = e.EndDate.ToString(),
                    Details = e.Details,
                    Address = e.Address,
                    City = e.City,
                    State = e.State,
                    ZipCode = e.ZipCode,
                    CreatedDate = e.CreatedDate,
                    UpdatedDate = e.UpdatedDate
                };

            return View(eViewModel);
        }
        public ActionResult Details(EventDataViewModel e)
        {
            if (string.IsNullOrEmpty(e.Name) || string.IsNullOrEmpty(e.Details))
                return new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest, "Missing required data.");

            Mapper.CreateMap<EventDataViewModel, Event>();            
            var evt = Mapper.Map(e, _eventService.GetByID(e.Id));
            evt.UpdatedDate = DateTime.UtcNow;

            _eventService.Update(evt);

            return View(e);
        }