internal static RestInteractionOption Create(Model model) { return(new RestInteractionOption { Name = model.Name, Description = model.Description, Type = model.Type, Required = model.Required, Default = model.Default, Choices = model.Choices == null ? new RestInteractionChoice[0] : model.Choices.Select(x => RestInteractionChoice.Create(x)).ToArray(), Options = model.Options == null ? new RestInteractionOption[0] : model.Options.Select(x => RestInteractionOption.Create(x)).ToArray(), }); }
internal static RestInteraction Create(Model model) { RestInteraction entity = new RestInteraction { Id = model.Id, Description = model.Description, ApplicationId = model.ApplicationId, Name = model.Name, Options = model.Options == null ? new RestInteractionOption[0] : model.Options.Select(x => RestInteractionOption.Create(x)).ToArray(), }; return(entity); }