Ejemplo n.º 1
0
        private async Task SerializeModel()
        {
            var json     = XdbModelWriter.Serialize(_xDbModel);
            var filename = _xDbModel.ToString() + ".json";
            await File.WriteAllTextAsync(filename, json);

            Console.WriteLine($"Model has been written to {filename}");
        }
        public static string CreateDeploymentJson(out string modelName)
        {
            XdbModel model = CreateModel();

            modelName = model.ToString();
            var json = Sitecore.XConnect.Serialization.XdbModelWriter.Serialize(model);

            return(json);
        }