Exemplo n.º 1
0
        protected virtual EventBase MapToEvent(EventBackofficeCreateModel model)
        {
            var @event = model.Map <EventBase>();

            @event.CreatorId = _intranetUserService.GetCurrentUserId();
            return(@event);
        }
Exemplo n.º 2
0
        public virtual EventBackofficeViewModel Create(EventBackofficeCreateModel createModel)
        {
            var creatingEvent = MapToEvent(createModel);
            var eventId       = _eventsService.Create(creatingEvent);

            var createdEvent = _eventsService.Get(eventId);
            var result       = createdEvent.Map <EventBackofficeViewModel>();

            return(result);
        }