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); }
public static domain.Talk MapToEntity(this TalkWriteModel talk) { return(new domain.Talk { Name = talk.Name, Talker = talk.Talker, Description = talk.Description, Duration = talk.Duration }); }