Example #1
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Title,EventType,StartDateTime,EndDateTime,Description,LogoPath,LocationInformation,RegistrationType")] EventViewModel @event)
        {
            if (ModelState.IsValid)
            {
                var command = @event.MapTo <CreateEvent>();
                var result  = await Mediator.RequestAsync(command);

                return(RedirectToAction("Index"));
            }

            return(View(@event));
        }