public static ProductionSpecification RemoveReferences(this ProductionSpecification item) { var obj = new ProductionSpecification(); obj = item.RemoveReference(); if (item.Product != null) { obj.Product = new Product(); obj.Product = item.Product.RemoveReference(); } return(obj); }