Beispiel #1
0
        public string WriteToResourceModel()
        {
            IDataListCompiler compiler = DataListFactory.CreateDataListCompiler();
            string            result   = string.Empty;
            string            errorString;

            ScalarCollection.ForEach(FixNamingForScalar);
            AddRecordsetNamesIfMissing();
            IBinaryDataList postDl = ConvertIDataListItemModelsToIBinaryDataList(out errorString);

            if (string.IsNullOrEmpty(errorString))
            {
                ErrorResultTO errors;
                result = CreateXmlDataFromBinaryDataList(postDl, out errors);
                if (Resource != null)
                {
                    Resource.DataList = result;
                }
            }

            compiler.ForceDeleteDataListByID(postDl.UID);
            if (!string.IsNullOrEmpty(errorString))
            {
                throw new Exception(errorString);
            }

            return(result);
        }
Beispiel #2
0
        public string WriteToResourceModel()
        {
            ScalarCollection.ForEach(_scalarHandler.FixNamingForScalar);
            _recordsetHandler.AddRecordsetNamesIfMissing();
            var result = GetDataListString();

            if (Resource != null)
            {
                Resource.DataList = result;
            }

            return(result);
        }