public static RetailEcoResCategory CreateRetailEcoResCategory(string name,
                                                                      string ecoResCategoryHierarchy_Name,
                                                                      long level,
                                                                      long axRecId,
                                                                      long parentCategory,
                                                                      long nestedSetLeft,
                                                                      long instanceRelationType,
                                                                      decimal defaultThreshold_PSN,
                                                                      long nestedSetRight,
                                                                      long categoryHierarchy,
                                                                      global::Microsoft.Dynamics.DataEntities.RetailProductHierarchyCategory retailProductHierarchyCategory)
        {
            RetailEcoResCategory retailEcoResCategory = new RetailEcoResCategory();

            retailEcoResCategory.Name = name;
            retailEcoResCategory.EcoResCategoryHierarchy_Name = ecoResCategoryHierarchy_Name;
            retailEcoResCategory.Level                = level;
            retailEcoResCategory.AxRecId              = axRecId;
            retailEcoResCategory.ParentCategory       = parentCategory;
            retailEcoResCategory.NestedSetLeft        = nestedSetLeft;
            retailEcoResCategory.InstanceRelationType = instanceRelationType;
            retailEcoResCategory.DefaultThreshold_PSN = defaultThreshold_PSN;
            retailEcoResCategory.NestedSetRight       = nestedSetRight;
            retailEcoResCategory.CategoryHierarchy    = categoryHierarchy;
            if ((retailProductHierarchyCategory == null))
            {
                throw new global::System.ArgumentNullException("retailProductHierarchyCategory");
            }
            retailEcoResCategory.RetailProductHierarchyCategory = retailProductHierarchyCategory;
            return(retailEcoResCategory);
        }
 partial void OnRetailProductHierarchyCategoryChanging(global::Microsoft.Dynamics.DataEntities.RetailProductHierarchyCategory value);