Exemple #1
0
        public Guid CreateNewEvenlt(Guid eventId, [FromBody] TalkWriteModel newTalk)
        {
            _logger.LogInformation("Add talk to event {EventId} received", eventId);
            var orTalk = newTalk.MapToEntity();

            orTalk.EventId = eventId;
            orTalk.Id      = Guid.NewGuid();
            _writeRepo.StoreTalk(orTalk);
            return(orTalk.Id);
        }
Exemple #2
0
 public static domain.Talk MapToEntity(this TalkWriteModel talk)
 {
     return(new domain.Talk
     {
         Name = talk.Name,
         Talker = talk.Talker,
         Description = talk.Description,
         Duration = talk.Duration
     });
 }