public Category(Models.GetProducts.Category category) { var categoryDeepClone = category.DeepClone(); this.Id = categoryDeepClone.Id; this.ParentId = categoryDeepClone.ParentId; this.Level = categoryDeepClone.Level; this.Name = categoryDeepClone.Name; this.IsActive = categoryDeepClone.IsActive; this.Childrens = categoryDeepClone.Childrens.Select(x => new Category(x)).ToList(); }