public bool AddSubCategory(SubCategoryEntity sce) { if (string.IsNullOrEmpty(sce.SubCategoryName) || string.IsNullOrWhiteSpace(sce.SubCategoryName)) { throw new Exception("SubCategoryName cannot be Blank or empty"); } if (sce.CatID <= 0) { throw new Exception("Please Enter the CategoryID Displaying Above. ID cannot be zero or NULL"); } return(dal.AddSubCategory(sce)); }