// Todo Interviewers ?? public static InterviewRound MapToInterviewRound(InterviewRoundCreateCommand command) { var interviewRound = new InterviewRound { SequenceNumber = command.SequenceNumber }; if (command.Questionnaire?.Any() == true) { interviewRound.Questionnaire = command.Questionnaire.Select(x => InterchangeTemplateCreateCommand.MapToInterchangeTemplate(x)); } return(interviewRound); }
// Didnot include CreatedAt, ModifiedAt, CreatedBy, ModifiedBy because they can be computed on server side. // Didnot include IsPublished because interview will not be published at creation. public static Interview MapToInterview(InterviewCreateCommand command) { var interview = new Interview { Id = command.Id, Code = command.Code, Title = command.Title, Status = command.Status, StartTime = command.StartTime, ExpirationTime = command.ExpirationTime, Context = command.Context }; if (command.Rounds?.Any() == true) { interview.Rounds = command.Rounds.Select(x => InterviewRoundCreateCommand.MapToInterviewRound(x)); } return(interview); }