Business.Concrete.CategoryManager.Update C# (CSharp) Метод

Update() публичный Метод

public Update ( Category category ) : IResult
category Category
Результат IResult
        public IResult Update(Category category)
        {
            IResult result = BusinessRules.Run(
                 CheckIfCategoryNameDuplicate(category.CategoryName)
                 );

            if (result != null) //hatalı kodlar kendi hata mesajıyla dönüyor, hatalı olmayanlara null döndük
            {
                return result; // hatalı logic, hata mesajı döner
            }
            _categoryDal.Update(category);
            return new SuccessResult();
        
        }
        private IResult CheckIfCategoryNameDuplicate(string categoryName)