public static IDomainMap StripDomainMap(IDomainMap domainMap)
        {
            IDomainMap cloneMap = (IDomainMap)domainMap.DeepClone();

            foreach (IClassMap classMap in cloneMap.ClassMaps)
            {
                classMap.Table             = "";
                classMap.TypeColumn        = "";
                classMap.TypeValue         = "";
                classMap.DocClassMapMode   = DocClassMapMode.Default;
                classMap.DocElement        = "";
                classMap.DocParentProperty = "";
                classMap.DocRoot           = "";

                foreach (IPropertyMap propertyMap in classMap.PropertyMaps)
                {
                    bool isNullable = propertyMap.GetIsNullable();
                    bool isAssigned = propertyMap.GetIsAssignedBySource();
                    int  maxLength  = propertyMap.GetMaxLength();

                    propertyMap.Table  = "";
                    propertyMap.Column = "";
                    propertyMap.AdditionalColumns.Clear();
                    propertyMap.IdColumn = "";
                    propertyMap.AdditionalIdColumns.Clear();

                    propertyMap.DocAttribute       = "";
                    propertyMap.DocElement         = "";
                    propertyMap.DocPropertyMapMode = DocPropertyMapMode.Default;

                    propertyMap.InheritInverseMappings = false;

                    propertyMap.IsNullable         = isNullable;
                    propertyMap.MaxLength          = maxLength;
                    propertyMap.IsAssignedBySource = isAssigned;
                }
            }

            foreach (ISourceMap sourceMap in cloneMap.SourceMaps)
            {
                sourceMap.ConnectionString           = "";
                sourceMap.Catalog                    = "";
                sourceMap.DocPath                    = "";
                sourceMap.DocEncoding                = "";
                sourceMap.DocRoot                    = "";
                sourceMap.ProviderAssemblyPath       = "";
                sourceMap.ProviderConnectionTypeName = "";
                sourceMap.ProviderType               = ProviderType.SqlClient;
                sourceMap.Schema = "";
                sourceMap.TableMaps.Clear();
            }

            return(cloneMap);
        }
        public static IDomainMap StripDomainMap(IDomainMap domainMap)
        {
            IDomainMap cloneMap = (IDomainMap) domainMap.DeepClone();

            foreach (IClassMap classMap in cloneMap.ClassMaps)
            {
                classMap.Table = "";
                classMap.TypeColumn = "" ;
                classMap.TypeValue = "" ;
                classMap.DocClassMapMode =  DocClassMapMode.Default;
                classMap.DocElement  = "" ;
                classMap.DocParentProperty = "" ;
                classMap.DocRoot  = "" ;

                foreach (IPropertyMap propertyMap in classMap.PropertyMaps)
                {
                    bool isNullable = propertyMap.GetIsNullable();
                    bool isAssigned = propertyMap.GetIsAssignedBySource();
                    int maxLength = propertyMap.GetMaxLength();

                    propertyMap.Table = "";
                    propertyMap.Column = "";
                    propertyMap.AdditionalColumns.Clear() ;
                    propertyMap.IdColumn = "";
                    propertyMap.AdditionalIdColumns.Clear() ;

                    propertyMap.DocAttribute  = "";
                    propertyMap.DocElement  = "";
                    propertyMap.DocPropertyMapMode  = DocPropertyMapMode.Default;

                    propertyMap.InheritInverseMappings = false;

                    propertyMap.IsNullable = isNullable;
                    propertyMap.MaxLength = maxLength;
                    propertyMap.IsAssignedBySource = isAssigned;
                }
            }

            foreach (ISourceMap sourceMap in cloneMap.SourceMaps)
            {
                sourceMap.ConnectionString = "";
                sourceMap.Catalog = "";
                sourceMap.DocPath  = "";
                sourceMap.DocEncoding  = "";
                sourceMap.DocRoot   = "";
                sourceMap.ProviderAssemblyPath    = "";
                sourceMap.ProviderConnectionTypeName    = "";
                sourceMap.ProviderType  = ProviderType.SqlClient;
                sourceMap.Schema  = "";
                sourceMap.TableMaps.Clear() ;
            }

            return cloneMap;
        }